File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99#include < util/time.h>
1010#include < util/translation.h>
1111
12+ #include < cassert>
13+
14+ void NullNodeSyncNotifier::SyncReset () { assert (false ); }
15+ void NullNodeSyncNotifier::SyncFinished () { assert (false ); }
16+
1217CMasternodeSync::CMasternodeSync (std::unique_ptr<NodeSyncNotifier>&& sync_notifier) :
1318 nTimeAssetSyncStarted{GetTime ()},
1419 nTimeLastBumped{GetTime ()},
Original file line number Diff line number Diff line change @@ -32,6 +32,20 @@ class NodeSyncNotifier
3232 virtual ~NodeSyncNotifier () = default ;
3333};
3434
35+ /* * Stub implementation for use in chainstate-only (non-network) contexts.
36+ * CMasternodeSync constructed with this notifier permanently returns
37+ * IsBlockchainSynced()=false and IsSynced()=false, which correctly disables
38+ * network-dependent validation paths.
39+ *
40+ * Asserts on any call — if sync state is being advanced, a real notifier
41+ * (NodeSyncNotifierImpl) must be used instead. */
42+ class NullNodeSyncNotifier final : public NodeSyncNotifier
43+ {
44+ public:
45+ void SyncReset () override ;
46+ void SyncFinished () override ;
47+ };
48+
3549//
3650// CMasternodeSync : Sync masternode assets in stages
3751//
You can’t perform that action at this time.
0 commit comments