Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/chain.cpp
Show First 20 Lines • Show All 377 Lines • ▼ Show 20 Lines | public: | ||||
bool resume_possible) override { | bool resume_possible) override { | ||||
::uiInterface.ShowProgress(title, progress, resume_possible); | ::uiInterface.ShowProgress(title, progress, resume_possible); | ||||
} | } | ||||
std::unique_ptr<Handler> handleNotifications( | std::unique_ptr<Handler> handleNotifications( | ||||
std::shared_ptr<Notifications> notifications) override { | std::shared_ptr<Notifications> notifications) override { | ||||
return std::make_unique<NotificationsHandlerImpl>( | return std::make_unique<NotificationsHandlerImpl>( | ||||
std::move(notifications)); | std::move(notifications)); | ||||
} | } | ||||
void waitForNotificationsIfNewBlocksConnected( | void | ||||
const BlockHash &old_tip) override { | waitForNotificationsIfTipChanged(const BlockHash &old_tip) override { | ||||
if (!old_tip.IsNull()) { | if (!old_tip.IsNull()) { | ||||
LOCK(::cs_main); | LOCK(::cs_main); | ||||
if (old_tip == ::ChainActive().Tip()->GetBlockHash()) { | if (old_tip == ::ChainActive().Tip()->GetBlockHash()) { | ||||
return; | return; | ||||
} | } | ||||
CBlockIndex *block = LookupBlockIndex(old_tip); | |||||
if (block && block->GetAncestor(::ChainActive().Height()) == | |||||
::ChainActive().Tip()) { | |||||
return; | |||||
} | |||||
} | } | ||||
SyncWithValidationInterfaceQueue(); | SyncWithValidationInterfaceQueue(); | ||||
} | } | ||||
std::unique_ptr<Handler> | std::unique_ptr<Handler> | ||||
handleRpc(const CRPCCommand &command) override { | handleRpc(const CRPCCommand &command) override { | ||||
return std::make_unique<RpcHandlerImpl>(command); | return std::make_unique<RpcHandlerImpl>(command); | ||||
} | } | ||||
Show All 26 Lines |