diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2014-10-19 18:17:01 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2014-10-20 10:59:12 -0700 |
commit | a96d113962b92b550a04d6ab0f580d29401039da (patch) | |
tree | a4f204b5087e8aee6ee1565756a0e16c6aa4c993 /src/main.h | |
parent | 84d13eef883769451ba9f77b56d9738d24474d5c (diff) |
Rename CWalletInterface to CValidationInterface
It's useful for much more than wallets.
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/main.h b/src/main.h index 7939b087ec..c0c1fb2707 100644 --- a/src/main.h +++ b/src/main.h @@ -129,17 +129,17 @@ class CBlockTreeDB; class CTxUndo; class CScriptCheck; class CValidationState; -class CWalletInterface; +class CValidationInterface; struct CNodeStateStats; struct CBlockTemplate; /** Register a wallet to receive updates from core */ -void RegisterWallet(CWalletInterface* pwalletIn); +void RegisterValidationInterface(CValidationInterface* pwalletIn); /** Unregister a wallet from core */ -void UnregisterWallet(CWalletInterface* pwalletIn); +void UnregisterValidationInterface(CValidationInterface* pwalletIn); /** Unregister all wallets from core */ -void UnregisterAllWallets(); +void UnregisterAllValidationInterfaces(); /** Push an updated transaction to all registered wallets */ void SyncWithWallets(const CTransaction& tx, const CBlock* pblock = NULL); @@ -640,17 +640,17 @@ public: }; -class CWalletInterface { +class CValidationInterface { protected: - virtual void SyncTransaction(const CTransaction &tx, const CBlock *pblock) =0; - virtual void EraseFromWallet(const uint256 &hash) =0; - virtual void SetBestChain(const CBlockLocator &locator) =0; - virtual void UpdatedTransaction(const uint256 &hash) =0; - virtual void Inventory(const uint256 &hash) =0; - virtual void ResendWalletTransactions() =0; - friend void ::RegisterWallet(CWalletInterface*); - friend void ::UnregisterWallet(CWalletInterface*); - friend void ::UnregisterAllWallets(); + 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() {}; + friend void ::RegisterValidationInterface(CValidationInterface*); + friend void ::UnregisterValidationInterface(CValidationInterface*); + friend void ::UnregisterAllValidationInterfaces(); }; #endif // BITCOIN_MAIN_H |