aboutsummaryrefslogtreecommitdiff
path: root/src/validationinterface.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2016-10-18 22:34:13 +0200
committerWladimir J. van der Laan <[email protected]>2016-10-18 22:48:51 +0200
commit05998da5a7e2be6af0ecb53f4f645464646175ef (patch)
tree5b8aca3a9bbc7256e0e4909b63e3e77abd58c139 /src/validationinterface.h
parentMerge #8965: Mention that PPA doesn't support Debian (diff)
parentUse BlockChecked signal to send reject messages from mapBlockSource (diff)
downloaddiscoin-05998da5a7e2be6af0ecb53f4f645464646175ef.tar.xz
discoin-05998da5a7e2be6af0ecb53f4f645464646175ef.zip
Merge #8865: Decouple peer-processing-logic from block-connection-logic
a9aec5c Use BlockChecked signal to send reject messages from mapBlockSource (Matt Corallo) 7565e03 Remove SyncWithWallets wrapper function (Matt Corallo) 12ee1fe Always call UpdatedBlockTip, even if blocks were only disconnected (Matt Corallo) f5efa28 Remove CConnman parameter from ProcessNewBlock/ActivateBestChain (Matt Corallo) fef1010 Use CValidationInterface from chain logic to notify peer logic (Matt Corallo) aefcb7b Move net-processing logic definitions together in main.h (Matt Corallo) 0278fb5 Remove duplicate nBlocksEstimate cmp (we already checked IsIBD()) (Matt Corallo) 87e7d72 Make validationinterface.UpdatedBlockTip more verbose (Matt Corallo)
Diffstat (limited to 'src/validationinterface.h')
-rw-r--r--src/validationinterface.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/validationinterface.h b/src/validationinterface.h
index 0c91ec830..a29859999 100644
--- a/src/validationinterface.h
+++ b/src/validationinterface.h
@@ -28,12 +28,10 @@ void RegisterValidationInterface(CValidationInterface* pwalletIn);
void UnregisterValidationInterface(CValidationInterface* pwalletIn);
/** Unregister all wallets from core */
void UnregisterAllValidationInterfaces();
-/** Push an updated transaction to all registered wallets */
-void SyncWithWallets(const CTransaction& tx, const CBlockIndex *pindex, int posInBlock = -1);
class CValidationInterface {
protected:
- virtual void UpdatedBlockTip(const CBlockIndex *pindex) {}
+ virtual void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) {}
virtual void SyncTransaction(const CTransaction &tx, const CBlockIndex *pindex, int posInBlock) {}
virtual void SetBestChain(const CBlockLocator &locator) {}
virtual void UpdatedTransaction(const uint256 &hash) {}
@@ -49,7 +47,9 @@ protected:
struct CMainSignals {
/** Notifies listeners of updated block chain tip */
- boost::signals2::signal<void (const CBlockIndex *)> UpdatedBlockTip;
+ boost::signals2::signal<void (const CBlockIndex *, const CBlockIndex *, bool fInitialDownload)> UpdatedBlockTip;
+ /** A posInBlock value for SyncTransaction which indicates the transaction was conflicted, disconnected, or not in a block */
+ static const int SYNC_TRANSACTION_NOT_IN_BLOCK = -1;
/** Notifies listeners of updated transaction data (transaction, and optionally the block it is found in. */
boost::signals2::signal<void (const CTransaction &, const CBlockIndex *pindex, int posInBlock)> SyncTransaction;
/** Notifies listeners of an updated transaction without new data (for now: a coinbase potentially becoming visible). */