dash/src
Wladimir J. van der Laan a22d90420c Merge #12431: Only call NotifyBlockTip when chainActive changes
f98b54352 Only call NotifyBlockTip when the active chain changes (James O'Beirne)
152b7fb25 [tests] Add a (failing) test for waitforblockheight (James O'Beirne)

Pull request description:

  This is a subset of the more controversial https://github.com/bitcoin/bitcoin/pull/12407, but this also adds a test demonstrating the bug.

  In InvalidateBlock, we're calling NotifyBlockTip with the now-invalid block's prev regardless of what chain the ancestor block is on. This could create numerous issues, but it at least screws up `waitforblockheight` (or anything else relying on `rpc/blockchain.cpp:latestblock`) when InvalidateBlock is called on a block not in chainActive, which can happen via RPC.

  Only call NotifyBlockTip when the block being marked invalid is on the active chain.

Tree-SHA512: 9a54fe5e8c7eb489daf5df4483c0986129e871e2ca931a456ba869ecb5d5a8d4f7bd27ccc9e711e9292c9ed79ddef896c85d0e81fc76883503e327995b0e914f
2020-06-13 14:50:11 -05:00
..
bench scripted-diff: Rename wallet database classes (begin bitcoin#11851) 2020-05-10 12:13:46 -05:00
bls Improve logging in LLMQ sig handling 2020-04-07 07:29:23 +02:00
compat Merge #12998: Default to defining endian-conversion DECLs in compat w/o config 2020-04-03 04:10:53 -05:00
config
consensus Implement new way of concentrated signature recovery 2020-03-31 19:58:07 +02:00
crypto Merge #12573: Fix compilation when compiler do not support __builtin_clz* 2020-04-16 10:24:22 -05:00
evo scripted-diff: Convert 11 enums into scoped enums (C++11) (merge #10742) 2020-06-11 23:20:48 -05:00
governance remove /* continued */ where is is not needed 2020-06-12 15:45:05 +00:00
immer
leveldb Merge #12518: [0.16] Bump leveldb subtree 2020-03-24 11:43:10 -05:00
llmq fix lint failure 2020-06-12 01:17:37 -05:00
masternode Change litemode from disabling all Dash specific features to disabling governance validation (#3488) 2020-06-13 21:18:31 +03:00
obj
obj-test
policy scripted-diff: Convert 11 enums into scoped enums (C++11) (merge #10742) 2020-06-11 23:20:48 -05:00
primitives Merge #12731: Support serialization as another type without casting 2020-06-11 23:20:48 -05:00
privatesend Change litemode from disabling all Dash specific features to disabling governance validation (#3488) 2020-06-13 21:18:31 +03:00
qt Merge #12080: Add support to search the address book 2020-06-13 14:50:11 -05:00
rpc Merge #11872: [rpc] createrawtransaction: Accept sorted outputs 2020-06-13 14:50:11 -05:00
script Merge #12731: Support serialization as another type without casting 2020-06-11 23:20:48 -05:00
secp256k1 Merge #15703: Update secp256k1 subtree to latest upstream 2020-03-14 11:01:03 -05:00
support Merge #12716: Fix typos and cleanup in various files 2020-06-11 23:20:48 -05:00
test Merge #11872: [rpc] createrawtransaction: Accept sorted outputs 2020-06-13 14:50:11 -05:00
univalue Some Dashification (#3513) 2020-06-11 11:39:04 +03:00
wallet Backport 12381 (#3528) 2020-06-13 21:21:30 +03:00
zmq Merge #10493: Use range-based for loops (C++11) when looping over map elements 2020-04-01 12:43:18 -05:00
.clang-format
addrdb.cpp Merge #10574: Remove includes in .cpp files for things the corresponding .h file already included 2020-04-01 12:43:18 -05:00
addrdb.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
addressindex.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
addrman.cpp Merge #12622: net: Correct addrman logging 2020-06-13 14:50:11 -05:00
addrman.h Merge #9037: net: Add test-before-evict discipline to addrman 2020-06-13 14:50:11 -05:00
amount.h
arith_uint256.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
arith_uint256.h Merge #12564: [arith_uint256] Avoid unnecessary this-copy using prefix operator 2020-06-13 14:50:11 -05:00
base58.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
base58.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
batchedlogger.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
batchedlogger.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
bip39_english.h
bip39.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
bip39.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
blockencodings.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
blockencodings.h Merge #14685: fix a deserialization overflow edge case 2020-06-08 20:27:14 -05:00
bloom.cpp fix lint failure 2020-06-12 01:17:37 -05:00
bloom.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
cachemap.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
cachemultimap.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
chain.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
chain.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
chainparams.cpp Merge #12283: Fix typos 2020-06-10 18:32:43 -05:00
chainparams.h Move LLMQ connection retry timeout into chainparams 2020-03-21 12:21:09 +01:00
chainparamsbase.cpp Merge #11862: Network specific conf sections 2020-05-10 11:15:58 -05:00
chainparamsbase.h Merge #12878: [refactor] Config handling refactoring in preparation for network-specific sections 2020-05-09 17:35:59 -05:00
chainparamsseeds.h
checkpoints.cpp Merge #10574: Remove includes in .cpp files for things the corresponding .h file already included 2020-04-01 12:43:18 -05:00
checkpoints.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
checkqueue.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
clientversion.cpp Merge #11966: clientversion: Use full commit hash for commit-based version descriptions 2020-06-11 23:20:48 -05:00
clientversion.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
coins.cpp Merge #10574: Remove includes in .cpp files for things the corresponding .h file already included 2020-04-01 12:43:18 -05:00
coins.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
compat.h Merge pull request #3445 from codablock/pr_epoll 2020-04-22 17:10:33 +02:00
compressor.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
compressor.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
core_io.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
core_memusage.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
core_read.cpp Merge #10498: Use static_cast instead of C-style casts for non-fundamental types 2020-06-10 18:32:43 -05:00
core_write.cpp Merge #12716: Fix typos and cleanup in various files 2020-06-11 23:20:48 -05:00
ctpl.h
cuckoocache.h Merge #12716: Fix typos and cleanup in various files 2020-06-11 23:20:48 -05:00
cxxtimer.hpp
dash-cli-res.rc
dash-cli.cpp Merge #12050: [trivial] Implements a virtual destructor on the BaseRequestHandler class. 2020-06-10 18:32:43 -05:00
dash-tx-res.rc
dash-tx.cpp Merge #12878: [refactor] Config handling refactoring in preparation for network-specific sections 2020-05-09 17:35:59 -05:00
dashd-res.rc
dashd.cpp scripted-diff: Convert 11 enums into scoped enums (C++11) (merge #10742) 2020-06-11 23:20:48 -05:00
dbwrapper.cpp Merge #12891: [logging] add lint-logs.sh to check for newline termination. 2020-06-11 23:20:48 -05:00
dbwrapper.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
dsnotificationinterface.cpp Change litemode from disabling all Dash specific features to disabling governance validation (#3488) 2020-06-13 21:18:31 +03:00
dsnotificationinterface.h Fix issues introduced with asynchronous signal handling (#3369) 2020-03-20 19:11:54 +03:00
flat-database.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
fs.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
fs.h
hash.cpp Merge #11884: Remove unused include in hash.cpp 2020-03-24 11:43:10 -05:00
hash.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
hdchain.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
hdchain.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
httprpc.cpp Bugfix: Include <memory> for std::unique_ptr 2020-04-08 11:46:27 -05:00
httprpc.h
httpserver.cpp Merge pull request #3518 from PastaPastaPasta/backports-0.17-pr1 2020-06-11 20:51:58 +03:00
httpserver.h
indirectmap.h
init.cpp Backport 12381 (#3528) 2020-06-13 21:21:30 +03:00
init.h scripted-diff: Convert 11 enums into scoped enums (C++11) (merge #10742) 2020-06-11 23:20:48 -05:00
keepass.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
keepass.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
key.cpp Merge #10574: Remove includes in .cpp files for things the corresponding .h file already included 2020-04-01 12:43:18 -05:00
key.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
keystore.cpp Merge #11667: Add scripts to dumpwallet RPC 2020-04-01 12:43:18 -05:00
keystore.h Merge #11667: Add scripts to dumpwallet RPC 2020-04-01 12:43:18 -05:00
limitedmap.h Add cache for CBlockTreeDB::HasTxIndex (#3402) 2020-04-08 22:18:33 +02:00
Makefile.am Merge #12836: Make WalletInitInterface and DummyWalletInit private, fix nullptr deref (#3498) 2020-05-20 12:24:51 +03:00
Makefile.bench.include Merge #16046: util: Add type safe GetTime 2020-04-08 14:50:07 +02:00
Makefile.leveldb.include
Makefile.qt.include qt: Some UI fixes and improvements (#3500) 2020-06-04 14:43:06 +03:00
Makefile.qttest.include
Makefile.test.include Merge #12895: tests: Add note about test suite name uniqueness requirement to developer notes 2020-06-11 23:20:48 -05:00
memusage.h Bugfix: Include <memory> for std::unique_ptr 2020-04-08 11:46:27 -05:00
merkleblock.cpp Merge #11293: Deduplicate CMerkleBlock construction code, add test coverage 2020-04-08 11:46:27 -05:00
merkleblock.h Merge #11293: Deduplicate CMerkleBlock construction code, add test coverage 2020-04-08 11:46:27 -05:00
messagesigner.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
messagesigner.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
miner.cpp scripted-diff: Convert 11 enums into scoped enums (C++11) (merge #10742) 2020-06-11 23:20:48 -05:00
miner.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
net_processing.cpp Merge #12716: Fix typos and cleanup in various files 2020-06-11 23:20:48 -05:00
net_processing.h Merge #14027: Skip stale tip checking if outbound connections are off or if reindexing. 2020-06-08 20:27:14 -05:00
net.cpp Merge #9037: net: Add test-before-evict discipline to addrman 2020-06-13 14:50:11 -05:00
net.h Backport 12381 (#3528) 2020-06-13 21:21:30 +03:00
netaddress.cpp Merge pull request #3518 from PastaPastaPasta/backports-0.17-pr1 2020-06-11 20:51:58 +03:00
netaddress.h Merge #14728: fix uninitialized read when stringifying an addrLocal 2020-06-09 19:06:54 -05:00
netbase.cpp Merge pull request #3518 from PastaPastaPasta/backports-0.17-pr1 2020-06-11 20:51:58 +03:00
netbase.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
netfulfilledman.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
netfulfilledman.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
netmessagemaker.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
noui.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
noui.h
pow.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
pow.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
prevector.h
protocol.cpp Merge bitcoin#10387: Eventually connect to NODE_NETWORK_LIMITED peers (#3417) 2020-04-19 16:21:47 +03:00
protocol.h Merge #12731: Support serialization as another type without casting 2020-06-11 23:20:48 -05:00
pubkey.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
pubkey.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
random.cpp Better clarification for future conflict resolution 2020-04-14 15:16:51 +02:00
random.h Merge #12716: Fix typos and cleanup in various files 2020-06-11 23:20:48 -05:00
rest.cpp Merge #13180: Fix re-declared scoped enum as unscoped (Causes issues with some compilers) 2020-06-11 23:20:48 -05:00
reverse_iterator.h
reverselock.h
saltedhasher.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
saltedhasher.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
scheduler.cpp Merge #11824: Block ActivateBestChain to empty validationinterface queue 2020-03-24 17:21:59 +03:00
scheduler.h Merge #11824: Block ActivateBestChain to empty validationinterface queue 2020-03-24 17:21:59 +03:00
serialize.h Merge #12731: Support serialization as another type without casting 2020-06-11 23:20:48 -05:00
spentindex.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
spork.cpp Change litemode from disabling all Dash specific features to disabling governance validation (#3488) 2020-06-13 21:18:31 +03:00
spork.h Remove spork 15, 16, 20 (#3493) 2020-05-20 12:24:35 +03:00
stacktraces.cpp fix lint failure 2020-06-12 01:17:37 -05:00
stacktraces.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
streams.h Merge #12283: Fix typos 2020-06-10 18:32:43 -05:00
sync.cpp remove /* continued */ where is is not needed 2020-06-12 15:45:05 +00:00
sync.h Merge #13423: [net] Thread safety annotations in net_processing 2020-06-08 20:27:14 -05:00
threadinterrupt.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
threadinterrupt.h
threadsafety.h Merge #13423: [net] Thread safety annotations in net_processing 2020-06-08 20:27:14 -05:00
timedata.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
timedata.h
tinyformat.h Merge #12716: Fix typos and cleanup in various files 2020-06-11 23:20:48 -05:00
torcontrol.cpp Backport 12381 (#3528) 2020-06-13 21:21:30 +03:00
torcontrol.h Backport 12381 (#3528) 2020-06-13 21:21:30 +03:00
txdb.cpp Merge #12891: [logging] add lint-logs.sh to check for newline termination. 2020-06-11 23:20:48 -05:00
txdb.h Merge #12731: Support serialization as another type without casting 2020-06-11 23:20:48 -05:00
txmempool.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
txmempool.h Merge #12716: Fix typos and cleanup in various files 2020-06-11 23:20:48 -05:00
ui_interface.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
ui_interface.h
uint256.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
uint256.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
undo.h Merge #12716: Fix typos and cleanup in various files 2020-06-11 23:20:48 -05:00
unordered_lru_cache.h
util.cpp Some Dashification (#3513) 2020-06-11 11:39:04 +03:00
util.h Merge #12716: Fix typos and cleanup in various files 2020-06-11 23:20:48 -05:00
utilmoneystr.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
utilmoneystr.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
utilstrencodings.cpp Merge #12182: Remove useless string initializations 2020-06-10 18:32:43 -05:00
utilstrencodings.h
utiltime.cpp Merge pull request #3397 from codablock/pr_backport_txrequests 2020-04-09 00:12:44 +02:00
utiltime.h Merge #16046: util: Add type safe GetTime 2020-04-08 14:50:07 +02:00
validation.cpp Merge #12431: Only call NotifyBlockTip when chainActive changes 2020-06-13 14:50:11 -05:00
validation.h Merge #12743: Fix csBestBlock/cvBlockChange waiting in rpc/mining 2020-04-16 10:24:22 -05:00
validationinterface.cpp Merge #11824: Block ActivateBestChain to empty validationinterface queue 2020-03-24 17:21:59 +03:00
validationinterface.h Merge #11824: Block ActivateBestChain to empty validationinterface queue 2020-03-24 17:21:59 +03:00
version.h Verify min proto version and open ports of LLMQ members and vote on bad ones 2020-03-31 07:07:52 +02:00
versionbits.cpp scripted-diff: Convert 11 enums into scoped enums (C++11) (merge #10742) 2020-06-11 23:20:48 -05:00
versionbits.h scripted-diff: Convert 11 enums into scoped enums (C++11) (merge #10742) 2020-06-11 23:20:48 -05:00
walletinitinterface.h Merge #12836: Make WalletInitInterface and DummyWalletInit private, fix nullptr deref (#3498) 2020-05-20 12:24:51 +03:00
warnings.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
warnings.h