diff options
author | Adam Stein <adaminsky@gmail.com> | 2020-08-02 00:53:41 -0700 |
---|---|---|
committer | Adam Stein <adaminsky@gmail.com> | 2020-08-12 15:16:22 -0700 |
commit | c133cdcdc3397a734d57e05494682bf9bf6f4c15 (patch) | |
tree | 30d186332c06ca9d17cd54dae5f7f179034df849 /src/net_processing.cpp | |
parent | 007e15dcd7f8b42501e31cc36343655c53027077 (diff) |
Cap listsinceblock target_confirmations param
Previously, listsinceblock would fail with error code -1 when the
target_confirmations exceeded the number of confirmations of the genesis
block. This commit allows target_confirmations to refer to a lastblock
hash with more confirmations than exist in the chain by setting the
lastblock hash to the genesis hash in this case. This allows for
`listsinceblock "" 6` to not fail if the block count is less than 5
which may happen on regtest.
Includes update to the functional test for listsinceblock to test for
this case.
Diffstat (limited to 'src/net_processing.cpp')
0 files changed, 0 insertions, 0 deletions