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/interfaces/chain.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/interfaces/chain.cpp') diff --git a/src/interfaces/chain.cpp b/src/interfaces/chain.cpp index 23099a7799..c2a8faf8c3 100644 --- a/src/interfaces/chain.cpp +++ b/src/interfaces/chain.cpp @@ -182,11 +182,11 @@ public: const CBlockIndex* index, const std::vector& tx_conflicted) override { - m_notifications->BlockConnected(*block, tx_conflicted); + m_notifications->BlockConnected(*block, tx_conflicted, index->nHeight); } - void BlockDisconnected(const std::shared_ptr& block) override + void BlockDisconnected(const std::shared_ptr& block, const CBlockIndex* index) override { - m_notifications->BlockDisconnected(*block); + m_notifications->BlockDisconnected(*block, index->nHeight); } void UpdatedBlockTip(const CBlockIndex* index, const CBlockIndex* fork_index, bool is_ibd) override { -- cgit v1.2.3