aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorJorge Timón <jtimon@jtimon.cc>2015-02-05 01:11:44 +0100
committerJorge Timón <jtimon@jtimon.cc>2015-03-24 17:21:41 +0100
commit26c16d9de9874ad2f5fe28377b838a19a558639d (patch)
treeb717b2b494657038684a4259d66b1904858b9b42 /src/main.h
parent22cfe23196c5006d6dd79e1e1a24323148246bde (diff)
Includes: Refactor: Move CValidationInterface and CMainSignals out of main
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h26
1 files changed, 1 insertions, 25 deletions
diff --git a/src/main.h b/src/main.h
index 936cd43e99..b0bab6f7bf 100644
--- a/src/main.h
+++ b/src/main.h
@@ -133,15 +133,6 @@ extern CBlockIndex *pindexBestHeader;
/** Minimum disk space required - used in CheckDiskSpace() */
static const uint64_t nMinDiskSpace = 52428800;
-/** Register a wallet to receive updates from core */
-void RegisterValidationInterface(CValidationInterface* pwalletIn);
-/** Unregister a wallet from core */
-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 CBlock* pblock = NULL);
-
/** Register with a network node to receive its signals */
void RegisterNodeSignals(CNodeSignals& nodeSignals);
/** Unregister a network node */
@@ -152,7 +143,7 @@ void UnregisterNodeSignals(CNodeSignals& nodeSignals);
* block is made active. Note that it does not, however, guarantee that the
* specific block passed to it has been checked for validity!
*
- * @param[out] state This may be set to an Error state if any error occurred processing it, including during validation/connection/etc of otherwise unrelated blocks during reorganisation; or it may be set to an Invalid state if pblock is itself invalid (but this is not guaranteed even when the block is checked). If you want to *possibly* get feedback on whether pblock is valid, you must also install a CValidationInterface - this will have its BlockChecked method called whenever *any* block completes validation.
+ * @param[out] state This may be set to an Error state if any error occurred processing it, including during validation/connection/etc of otherwise unrelated blocks during reorganisation; or it may be set to an Invalid state if pblock is itself invalid (but this is not guaranteed even when the block is checked). If you want to *possibly* get feedback on whether pblock is valid, you must also install a CValidationInterface (see validationinterface.h) - this will have its BlockChecked method called whenever *any* block completes validation.
* @param[in] pfrom The node which we are receiving the block from; it is added to mapBlockSource and may be penalised if the block is invalid.
* @param[in] pblock The block we want to process.
* @param[out] dbp If pblock is stored to disk (or already there), this will be set to its location.
@@ -512,19 +503,4 @@ extern CCoinsViewCache *pcoinsTip;
/** Global variable that points to the active block tree (protected by cs_main) */
extern CBlockTreeDB *pblocktree;
-
-class CValidationInterface {
-protected:
- virtual void SyncTransaction(const CTransaction &tx, const CBlock *pblock) {};
- virtual void EraseFromWallet(const uint256 &hash) {};
- virtual void SetBestChain(const CBlockLocator &locator) {};
- virtual void UpdatedTransaction(const uint256 &hash) {};
- virtual void Inventory(const uint256 &hash) {};
- virtual void ResendWalletTransactions() {};
- virtual void BlockChecked(const CBlock&, const CValidationState&) {};
- friend void ::RegisterValidationInterface(CValidationInterface*);
- friend void ::UnregisterValidationInterface(CValidationInterface*);
- friend void ::UnregisterAllValidationInterfaces();
-};
-
#endif // BITCOIN_MAIN_H