mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user