From 10b4729e33f76092bd8cfa06d1a5e0a066436f76 Mon Sep 17 00:00:00 2001 From: Antoine Riard Date: Wed, 24 Jul 2019 15:41:41 -0400 Subject: 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. --- src/test/validation_block_tests.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/test/validation_block_tests.cpp') 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& block) override + void BlockDisconnected(const std::shared_ptr& 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; } -- cgit v1.2.3