diff options
Diffstat (limited to 'src/interfaces')
| -rw-r--r-- | src/interfaces/chain.cpp | 4 | ||||
| -rw-r--r-- | src/interfaces/chain.h | 5 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/interfaces/chain.cpp b/src/interfaces/chain.cpp index c2a8faf8c..0635909ca 100644 --- a/src/interfaces/chain.cpp +++ b/src/interfaces/chain.cpp @@ -353,13 +353,11 @@ public: { return MakeUnique<NotificationsHandlerImpl>(*this, notifications); } - void waitForNotificationsIfNewBlocksConnected(const uint256& old_tip) override + void waitForNotificationsIfTipChanged(const uint256& old_tip) override { if (!old_tip.IsNull()) { LOCK(::cs_main); if (old_tip == ::ChainActive().Tip()->GetBlockHash()) return; - CBlockIndex* block = LookupBlockIndex(old_tip); - if (block && block->GetAncestor(::ChainActive().Height()) == ::ChainActive().Tip()) return; } SyncWithValidationInterfaceQueue(); } diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h index 4cb2aba2c..e07ec1b37 100644 --- a/src/interfaces/chain.h +++ b/src/interfaces/chain.h @@ -236,9 +236,8 @@ public: virtual std::unique_ptr<Handler> handleNotifications(Notifications& notifications) = 0; //! Wait for pending notifications to be processed unless block hash points to the current - //! chain tip, or to a possible descendant of the current chain tip that isn't currently - //! connected. - virtual void waitForNotificationsIfNewBlocksConnected(const uint256& old_tip) = 0; + //! chain tip. + virtual void waitForNotificationsIfTipChanged(const uint256& old_tip) = 0; //! Register handler for RPC. Command is not copied, so reference //! needs to remain valid until Handler is disconnected. |