diff options
author | Antoine Riard <ariard@student.42.fr> | 2019-07-24 15:41:41 -0400 |
---|---|---|
committer | Antoine Riard <ariard@student.42.fr> | 2019-11-05 12:59:16 -0500 |
commit | 10b4729e33f76092bd8cfa06d1a5e0a066436f76 (patch) | |
tree | 7ef80f8890067aa49125583624db014a0d6ec1e2 /src/test/validation_block_tests.cpp | |
parent | 50591f6ec61b802cf4193cdbefcc85ad75716e8d (diff) | |
download | bitcoin-10b4729e33f76092bd8cfa06d1a5e0a066436f76.tar.xz |
Pass block height in Chain::BlockConnected/Chain::BlockDisconnected
To do so we update CValidationInterface::BlockDisconnect to take a
CBlockIndex pointing to the block being disconnected.
This new parameter will be use in the following commit to establish
wallet height.
Diffstat (limited to 'src/test/validation_block_tests.cpp')
-rw-r--r-- | src/test/validation_block_tests.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/validation_block_tests.cpp b/src/test/validation_block_tests.cpp index ae998e92a5..26ca9a3162 100644 --- a/src/test/validation_block_tests.cpp +++ b/src/test/validation_block_tests.cpp @@ -40,9 +40,10 @@ struct TestSubscriber : public CValidationInterface { m_expected_tip = block->GetHash(); } - void BlockDisconnected(const std::shared_ptr<const CBlock>& block) override + void BlockDisconnected(const std::shared_ptr<const CBlock>& block, const CBlockIndex* pindex) override { BOOST_CHECK_EQUAL(m_expected_tip, block->GetHash()); + BOOST_CHECK_EQUAL(m_expected_tip, pindex->GetBlockHash()); m_expected_tip = block->hashPrevBlock; } |