From 817326a828d6148dc63d9ef08f641b9c0c522411 Mon Sep 17 00:00:00 2001 From: James O'Beirne Date: Fri, 29 Mar 2019 17:10:11 -0400 Subject: wallet: avoid rescans if under the snapshot Refuse to load a wallet if it requires a rescan lower than the height of an unvalidated snapshot we're running -- in more general terms, if we don't have data for the blocks. --- src/node/interfaces.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/node/interfaces.cpp') diff --git a/src/node/interfaces.cpp b/src/node/interfaces.cpp index 1a48957f0f..855db7b0ec 100644 --- a/src/node/interfaces.cpp +++ b/src/node/interfaces.cpp @@ -723,6 +723,11 @@ public: notifications.transactionAddedToMempool(entry.GetSharedTx(), 0 /* mempool_sequence */); } } + bool hasAssumedValidChain() override + { + return Assert(m_node.chainman)->IsSnapshotActive(); + } + NodeContext& m_node; }; } // namespace -- cgit v1.2.3