aboutsummaryrefslogtreecommitdiff
path: root/src/test/validation_block_tests.cpp
diff options
context:
space:
mode:
authorAntoine Riard <[email protected]>2019-07-24 15:41:41 -0400
committerAntoine Riard <[email protected]>2019-11-05 12:59:16 -0500
commit10b4729e33f76092bd8cfa06d1a5e0a066436f76 (patch)
tree7ef80f8890067aa49125583624db014a0d6ec1e2 /src/test/validation_block_tests.cpp
parentMerge #17357: tests: Add fuzzing harness for Bech32 encoding/decoding (diff)
downloaddiscoin-10b4729e33f76092bd8cfa06d1a5e0a066436f76.tar.xz
discoin-10b4729e33f76092bd8cfa06d1a5e0a066436f76.zip
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.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/validation_block_tests.cpp b/src/test/validation_block_tests.cpp
index ae998e92a..26ca9a316 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;
}