aboutsummaryrefslogtreecommitdiff
path: root/src/validationinterface.h
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2016-12-18 23:26:20 -0800
committerMatt Corallo <git@bluematt.me>2017-01-05 10:32:07 -0500
commit69872195773870de8ee6521c9f555d60395a5ad9 (patch)
tree1908f376ec268604207ed61bab985c5e851d9e27 /src/validationinterface.h
parent180586fd44c3154af846e18850c83d0ac1296787 (diff)
Add a CValidationInterface::NewPoWValidBlock callback
Diffstat (limited to 'src/validationinterface.h')
-rw-r--r--src/validationinterface.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/validationinterface.h b/src/validationinterface.h
index 717026389c..594072719c 100644
--- a/src/validationinterface.h
+++ b/src/validationinterface.h
@@ -8,6 +8,7 @@
#include <boost/signals2/signal.hpp>
#include <boost/shared_ptr.hpp>
+#include <memory>
class CBlock;
class CBlockIndex;
@@ -40,6 +41,7 @@ protected:
virtual void BlockChecked(const CBlock&, const CValidationState&) {}
virtual void GetScriptForMining(boost::shared_ptr<CReserveScript>&) {};
virtual void ResetRequestCount(const uint256 &hash) {};
+ virtual void NewPoWValidBlock(const CBlockIndex *pindex, const std::shared_ptr<const CBlock>& block) {};
friend void ::RegisterValidationInterface(CValidationInterface*);
friend void ::UnregisterValidationInterface(CValidationInterface*);
friend void ::UnregisterAllValidationInterfaces();
@@ -66,6 +68,10 @@ struct CMainSignals {
boost::signals2::signal<void (boost::shared_ptr<CReserveScript>&)> ScriptForMining;
/** Notifies listeners that a block has been successfully mined */
boost::signals2::signal<void (const uint256 &)> BlockFound;
+ /**
+ * Notifies listeners that a block which builds directly on our current tip
+ * has been received and connected to the headers tree, though not validated yet */
+ boost::signals2::signal<void (const CBlockIndex *, const std::shared_ptr<const CBlock>&)> NewPoWValidBlock;
};
CMainSignals& GetMainSignals();