aboutsummaryrefslogtreecommitdiff
path: root/src/validationinterface.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/validationinterface.h')
-rw-r--r--src/validationinterface.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/validationinterface.h b/src/validationinterface.h
index 6bf0f9c39f..0ca82235da 100644
--- a/src/validationinterface.h
+++ b/src/validationinterface.h
@@ -103,9 +103,20 @@ protected:
/**
* Notifies listeners of the new active block chain on-disk.
*
+ * Prior to this callback, any updates are not guaranteed to persist on disk
+ * (ie clients need to handle shutdown/restart safety by being able to
+ * understand when some updates were lost due to unclean shutdown).
+ *
+ * When this callback is invoked, the validation changes done by any prior
+ * callback are guaranteed to exist on disk and survive a restart, including
+ * an unclean shutdown.
+ *
+ * Provides a locator describing the best chain, which is likely useful for
+ * storing current state on disk in client DBs.
+ *
* Called on a background thread.
*/
- virtual void SetBestChain(const CBlockLocator &locator) {}
+ virtual void ChainStateFlushed(const CBlockLocator &locator) {}
/**
* Notifies listeners about an inventory item being seen on the network.
*
@@ -161,7 +172,7 @@ public:
void TransactionAddedToMempool(const CTransactionRef &);
void BlockConnected(const std::shared_ptr<const CBlock> &, const CBlockIndex *pindex, const std::shared_ptr<const std::vector<CTransactionRef>> &);
void BlockDisconnected(const std::shared_ptr<const CBlock> &);
- void SetBestChain(const CBlockLocator &);
+ void ChainStateFlushed(const CBlockLocator &);
void Inventory(const uint256 &);
void Broadcast(int64_t nBestBlockTime, CConnman* connman);
void BlockChecked(const CBlock&, const CValidationState&);