Changeset View
Changeset View
Standalone View
Standalone View
src/validationinterface.h
Show All 14 Lines | |||||
struct CBlockLocator; | struct CBlockLocator; | ||||
class CBlockIndex; | class CBlockIndex; | ||||
class CConnman; | class CConnman; | ||||
class CReserveScript; | class CReserveScript; | ||||
class CTransaction; | class CTransaction; | ||||
class CValidationInterface; | class CValidationInterface; | ||||
class CValidationState; | class CValidationState; | ||||
class uint256; | class uint256; | ||||
class txhash_t; | |||||
// These functions dispatch to one or all registered wallets | // These functions dispatch to one or all registered wallets | ||||
/** Register a wallet to receive updates from core */ | /** Register a wallet to receive updates from core */ | ||||
void RegisterValidationInterface(CValidationInterface *pwalletIn); | void RegisterValidationInterface(CValidationInterface *pwalletIn); | ||||
/** Unregister a wallet from core */ | /** Unregister a wallet from core */ | ||||
void UnregisterValidationInterface(CValidationInterface *pwalletIn); | void UnregisterValidationInterface(CValidationInterface *pwalletIn); | ||||
/** Unregister all wallets from core */ | /** Unregister all wallets from core */ | ||||
void UnregisterAllValidationInterfaces(); | void UnregisterAllValidationInterfaces(); | ||||
class CValidationInterface { | class CValidationInterface { | ||||
protected: | protected: | ||||
virtual void UpdatedBlockTip(const CBlockIndex *pindexNew, | virtual void UpdatedBlockTip(const CBlockIndex *pindexNew, | ||||
const CBlockIndex *pindexFork, | const CBlockIndex *pindexFork, | ||||
bool fInitialDownload) {} | bool fInitialDownload) {} | ||||
virtual void SyncTransaction(const CTransaction &tx, | virtual void SyncTransaction(const CTransaction &tx, | ||||
const CBlockIndex *pindex, int posInBlock) {} | const CBlockIndex *pindex, int posInBlock) {} | ||||
virtual void SetBestChain(const CBlockLocator &locator) {} | virtual void SetBestChain(const CBlockLocator &locator) {} | ||||
virtual void UpdatedTransaction(const uint256 &hash) {} | virtual void UpdatedTransaction(const txhash_t &hash) {} | ||||
virtual void Inventory(const uint256 &hash) {} | virtual void Inventory(const uint256 &hash) {} | ||||
virtual void ResendWalletTransactions(int64_t nBestBlockTime, | virtual void ResendWalletTransactions(int64_t nBestBlockTime, | ||||
CConnman *connman) {} | CConnman *connman) {} | ||||
virtual void BlockChecked(const CBlock &, const CValidationState &) {} | virtual void BlockChecked(const CBlock &, const CValidationState &) {} | ||||
virtual void GetScriptForMining(std::shared_ptr<CReserveScript> &){}; | virtual void GetScriptForMining(std::shared_ptr<CReserveScript> &){}; | ||||
virtual void ResetRequestCount(const uint256 &hash){}; | virtual void ResetRequestCount(const uint256 &hash){}; | ||||
virtual void NewPoWValidBlock(const CBlockIndex *pindex, | virtual void NewPoWValidBlock(const CBlockIndex *pindex, | ||||
const std::shared_ptr<const CBlock> &block){}; | const std::shared_ptr<const CBlock> &block){}; | ||||
Show All 23 Lines | struct CMainSignals { | ||||
*/ | */ | ||||
boost::signals2::signal<void(const CTransaction &, | boost::signals2::signal<void(const CTransaction &, | ||||
const CBlockIndex *pindex, int posInBlock)> | const CBlockIndex *pindex, int posInBlock)> | ||||
SyncTransaction; | SyncTransaction; | ||||
/** | /** | ||||
* Notifies listeners of an updated transaction without new data (for now: a | * Notifies listeners of an updated transaction without new data (for now: a | ||||
* coinbase potentially becoming visible). | * coinbase potentially becoming visible). | ||||
*/ | */ | ||||
boost::signals2::signal<void(const uint256 &)> UpdatedTransaction; | boost::signals2::signal<void(const txhash_t &)> UpdatedTransaction; | ||||
/** Notifies listeners of a new active block chain. */ | /** Notifies listeners of a new active block chain. */ | ||||
boost::signals2::signal<void(const CBlockLocator &)> SetBestChain; | boost::signals2::signal<void(const CBlockLocator &)> SetBestChain; | ||||
/** Notifies listeners about an inventory item being seen on the network. */ | /** Notifies listeners about an inventory item being seen on the network. */ | ||||
boost::signals2::signal<void(const uint256 &)> Inventory; | boost::signals2::signal<void(const uint256 &)> Inventory; | ||||
/** Tells listeners to broadcast their data. */ | /** Tells listeners to broadcast their data. */ | ||||
boost::signals2::signal<void(int64_t nBestBlockTime, CConnman *connman)> | boost::signals2::signal<void(int64_t nBestBlockTime, CConnman *connman)> | ||||
Broadcast; | Broadcast; | ||||
/** Notifies listeners of a block validation result */ | /** Notifies listeners of a block validation result */ | ||||
Show All 20 Lines |