Use override keyword for overriden class member functions (#1644)

* Use `override` keyword for all overriden functions

* more override
This commit is contained in:
gladcow 2018-02-15 10:29:15 +03:00 committed by UdjinM6
parent 580c4884c1
commit 2ea6f7d82e
27 changed files with 85 additions and 83 deletions

View File

@ -21,7 +21,7 @@ protected:
void AcceptedBlockHeader(const CBlockIndex *pindexNew) override; void AcceptedBlockHeader(const CBlockIndex *pindexNew) override;
void NotifyHeaderTip(const CBlockIndex *pindexNew, bool fInitialDownload) override; void NotifyHeaderTip(const CBlockIndex *pindexNew, bool fInitialDownload) override;
void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) override; void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) override;
void SyncTransaction(const CTransaction &tx, const CBlockIndex *pindex, int posInBlock); void SyncTransaction(const CTransaction &tx, const CBlockIndex *pindex, int posInBlock) override;
private: private:
CConnman& connman; CConnman& connman;

View File

@ -76,7 +76,7 @@ public:
virtual ~CGovernanceException() throw() {} virtual ~CGovernanceException() throw() {}
virtual const char* what() const throw() virtual const char* what() const throw() override
{ {
return strMessage.c_str(); return strMessage.c_str();
} }

View File

@ -48,11 +48,11 @@ public:
HTTPRPCTimerInterface(struct event_base* _base) : base(_base) HTTPRPCTimerInterface(struct event_base* _base) : base(_base)
{ {
} }
const char* Name() const char* Name() override
{ {
return "HTTP"; return "HTTP";
} }
RPCTimerBase* NewTimer(boost::function<void(void)>& func, int64_t millis) RPCTimerBase* NewTimer(boost::function<void(void)>& func, int64_t millis) override
{ {
return new HTTPRPCTimer(base, func, millis); return new HTTPRPCTimer(base, func, millis);
} }

View File

@ -46,7 +46,7 @@ public:
req(std::move(_req)), path(_path), func(_func) req(std::move(_req)), path(_path), func(_func)
{ {
} }
void operator()() void operator()() override
{ {
func(req.get(), path); func(req.get(), path);
} }

View File

@ -64,9 +64,9 @@ protected:
CHDChain hdChain; CHDChain hdChain;
public: public:
bool AddKeyPubKey(const CKey& key, const CPubKey &pubkey); bool AddKeyPubKey(const CKey& key, const CPubKey &pubkey) override;
bool GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const; bool GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const override;
bool HaveKey(const CKeyID &address) const bool HaveKey(const CKeyID &address) const override
{ {
bool result; bool result;
{ {
@ -75,7 +75,7 @@ public:
} }
return result; return result;
} }
void GetKeys(std::set<CKeyID> &setAddress) const void GetKeys(std::set<CKeyID> &setAddress) const override
{ {
setAddress.clear(); setAddress.clear();
{ {
@ -88,7 +88,7 @@ public:
} }
} }
} }
bool GetKey(const CKeyID &address, CKey &keyOut) const bool GetKey(const CKeyID &address, CKey &keyOut) const override
{ {
{ {
LOCK(cs_KeyStore); LOCK(cs_KeyStore);
@ -101,16 +101,16 @@ public:
} }
return false; return false;
} }
virtual bool AddCScript(const CScript& redeemScript); virtual bool AddCScript(const CScript& redeemScript) override;
virtual bool HaveCScript(const CScriptID &hash) const; virtual bool HaveCScript(const CScriptID &hash) const override;
virtual bool GetCScript(const CScriptID &hash, CScript& redeemScriptOut) const; virtual bool GetCScript(const CScriptID &hash, CScript& redeemScriptOut) const override;
virtual bool AddWatchOnly(const CScript &dest); virtual bool AddWatchOnly(const CScript &dest) override;
virtual bool RemoveWatchOnly(const CScript &dest); virtual bool RemoveWatchOnly(const CScript &dest) override;
virtual bool HaveWatchOnly(const CScript &dest) const; virtual bool HaveWatchOnly(const CScript &dest) const override;
virtual bool HaveWatchOnly() const; virtual bool HaveWatchOnly() const override;
bool GetHDChain(CHDChain& hdChainRet) const; virtual bool GetHDChain(CHDChain& hdChainRet) const;
}; };
typedef std::vector<unsigned char, secure_allocator<unsigned char> > CKeyingMaterial; typedef std::vector<unsigned char, secure_allocator<unsigned char> > CKeyingMaterial;

View File

@ -33,9 +33,9 @@ private:
public: public:
PeerLogicValidation(CConnman* connmanIn); PeerLogicValidation(CConnman* connmanIn);
virtual void SyncTransaction(const CTransaction& tx, const CBlockIndex* pindex, int nPosInBlock); virtual void SyncTransaction(const CTransaction& tx, const CBlockIndex* pindex, int nPosInBlock) override;
virtual void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload); virtual void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) override;
virtual void BlockChecked(const CBlock& block, const CValidationState& state); virtual void BlockChecked(const CBlock& block, const CValidationState& state) override;
}; };
struct CNodeStateStats { struct CNodeStateStats {

View File

@ -16,7 +16,7 @@ public:
explicit CoinControlTreeWidget(QWidget *parent = 0); explicit CoinControlTreeWidget(QWidget *parent = 0);
protected: protected:
virtual void keyPressEvent(QKeyEvent *event); virtual void keyPressEvent(QKeyEvent *event) override;
}; };
#endif // BITCOIN_QT_COINCONTROLTREEWIDGET_H #endif // BITCOIN_QT_COINCONTROLTREEWIDGET_H

View File

@ -51,7 +51,7 @@ public Q_SLOTS:
void accept(); void accept();
protected: protected:
virtual void keyPressEvent(QKeyEvent *event); virtual void keyPressEvent(QKeyEvent *event) override;
private: private:
Ui::ReceiveCoinsDialog *ui; Ui::ReceiveCoinsDialog *ui;
@ -62,7 +62,7 @@ private:
QModelIndex selectedRow(); QModelIndex selectedRow();
void copyColumnToClipboard(int column); void copyColumnToClipboard(int column);
virtual void resizeEvent(QResizeEvent *event); virtual void resizeEvent(QResizeEvent *event) override;
private Q_SLOTS: private Q_SLOTS:
void on_receiveButton_clicked(); void on_receiveButton_clicked();

View File

@ -38,8 +38,8 @@ public Q_SLOTS:
void copyImage(); void copyImage();
protected: protected:
virtual void mousePressEvent(QMouseEvent *event); virtual void mousePressEvent(QMouseEvent *event) override;
virtual void contextMenuEvent(QContextMenuEvent *event); virtual void contextMenuEvent(QContextMenuEvent *event) override;
private: private:
QMenu *contextMenu; QMenu *contextMenu;

View File

@ -127,8 +127,8 @@ class QtRPCTimerInterface: public RPCTimerInterface
{ {
public: public:
~QtRPCTimerInterface() {} ~QtRPCTimerInterface() {}
const char *Name() { return "Qt"; } const char *Name() override { return "Qt"; }
RPCTimerBase* NewTimer(boost::function<void(void)>& func, int64_t millis) RPCTimerBase* NewTimer(boost::function<void(void)>& func, int64_t millis) override
{ {
return new QtRPCTimerBase(func, millis); return new QtRPCTimerBase(func, millis);
} }

View File

@ -81,7 +81,7 @@ private:
GUIUtil::TableViewLastColumnResizingFixer *columnResizingFixer; GUIUtil::TableViewLastColumnResizingFixer *columnResizingFixer;
virtual void resizeEvent(QResizeEvent* event); virtual void resizeEvent(QResizeEvent* event) override;
bool eventFilter(QObject *obj, QEvent *event); bool eventFilter(QObject *obj, QEvent *event);

View File

@ -743,7 +743,7 @@ public:
submitblock_StateCatcher(const uint256 &hashIn) : hash(hashIn), found(false), state() {} submitblock_StateCatcher(const uint256 &hashIn) : hash(hashIn), found(false), state() {}
protected: protected:
virtual void BlockChecked(const CBlock& block, const CValidationState& stateIn) { virtual void BlockChecked(const CBlock& block, const CValidationState& stateIn) override {
if (block.GetHash() != hash) if (block.GetHash() != hash)
return; return;
found = true; found = true;

View File

@ -128,9 +128,9 @@ protected:
public: public:
TransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn) : txTo(txToIn), nIn(nInIn) {} TransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn) : txTo(txToIn), nIn(nInIn) {}
bool CheckSig(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode) const; bool CheckSig(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode) const override;
bool CheckLockTime(const CScriptNum& nLockTime) const; bool CheckLockTime(const CScriptNum& nLockTime) const override;
bool CheckSequence(const CScriptNum& nSequence) const; bool CheckSequence(const CScriptNum& nSequence) const override;
}; };
class MutableTransactionSignatureChecker : public TransactionSignatureChecker class MutableTransactionSignatureChecker : public TransactionSignatureChecker

View File

@ -27,7 +27,7 @@ private:
public: public:
CachingTransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn, bool storeIn=true) : TransactionSignatureChecker(txToIn, nInIn), store(storeIn) {} CachingTransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn, bool storeIn=true) : TransactionSignatureChecker(txToIn, nInIn), store(storeIn) {}
bool VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash) const; bool VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash) const override;
}; };
void InitSignatureCache(); void InitSignatureCache();

View File

@ -284,7 +284,7 @@ class DummySignatureChecker : public BaseSignatureChecker
public: public:
DummySignatureChecker() {} DummySignatureChecker() {}
bool CheckSig(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode) const bool CheckSig(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode) const override
{ {
return true; return true;
} }

View File

@ -39,16 +39,16 @@ class TransactionSignatureCreator : public BaseSignatureCreator {
public: public:
TransactionSignatureCreator(const CKeyStore* keystoreIn, const CTransaction* txToIn, unsigned int nInIn, int nHashTypeIn=SIGHASH_ALL); TransactionSignatureCreator(const CKeyStore* keystoreIn, const CTransaction* txToIn, unsigned int nInIn, int nHashTypeIn=SIGHASH_ALL);
const BaseSignatureChecker& Checker() const { return checker; } const BaseSignatureChecker& Checker() const override{ return checker; }
bool CreateSig(std::vector<unsigned char>& vchSig, const CKeyID& keyid, const CScript& scriptCode) const; bool CreateSig(std::vector<unsigned char>& vchSig, const CKeyID& keyid, const CScript& scriptCode) const override;
}; };
/** A signature creator that just produces 72-byte empty signatures. */ /** A signature creator that just produces 72-byte empty signatures. */
class DummySignatureCreator : public BaseSignatureCreator { class DummySignatureCreator : public BaseSignatureCreator {
public: public:
DummySignatureCreator(const CKeyStore* keystoreIn) : BaseSignatureCreator(keystoreIn) {} DummySignatureCreator(const CKeyStore* keystoreIn) : BaseSignatureCreator(keystoreIn) {}
const BaseSignatureChecker& Checker() const; const BaseSignatureChecker& Checker() const override;
bool CreateSig(std::vector<unsigned char>& vchSig, const CKeyID& keyid, const CScript& scriptCode) const; bool CreateSig(std::vector<unsigned char>& vchSig, const CKeyID& keyid, const CScript& scriptCode) const override;
}; };
/** Produce a script signature using a generic signature creator. */ /** Produce a script signature using a generic signature creator. */

View File

@ -27,7 +27,7 @@ public:
insecure_rand = FastRandomContext(true); insecure_rand = FastRandomContext(true);
} }
int RandomInt(int nMax) int RandomInt(int nMax) override
{ {
state = (CHashWriter(SER_GETHASH, 0) << state).GetHash().GetCheapHash(); state = (CHashWriter(SER_GETHASH, 0) << state).GetHash().GetCheapHash();
return (unsigned int)(state % nMax); return (unsigned int)(state % nMax);

View File

@ -28,7 +28,7 @@ public:
class CAddrManUncorrupted : public CAddrManSerializationMock class CAddrManUncorrupted : public CAddrManSerializationMock
{ {
public: public:
void Serialize(CDataStream& s) const void Serialize(CDataStream& s) const override
{ {
CAddrMan::Serialize(s); CAddrMan::Serialize(s);
} }
@ -37,7 +37,7 @@ public:
class CAddrManCorrupted : public CAddrManSerializationMock class CAddrManCorrupted : public CAddrManSerializationMock
{ {
public: public:
void Serialize(CDataStream& s) const void Serialize(CDataStream& s) const override
{ {
// Produces corrupt output that claims addrman has 20 addrs when it only has one addr. // Produces corrupt output that claims addrman has 20 addrs when it only has one addr.
unsigned char nVersion = 1; unsigned char nVersion = 1;

View File

@ -23,11 +23,11 @@ private:
mutable ThresholdConditionCache cache; mutable ThresholdConditionCache cache;
public: public:
int64_t BeginTime(const Consensus::Params& params) const { return TestTime(10000); } int64_t BeginTime(const Consensus::Params& params) const override { return TestTime(10000); }
int64_t EndTime(const Consensus::Params& params) const { return TestTime(20000); } int64_t EndTime(const Consensus::Params& params) const override { return TestTime(20000); }
int Period(const Consensus::Params& params) const { return 1000; } int Period(const Consensus::Params& params) const override { return 1000; }
int Threshold(const Consensus::Params& params) const { return 900; } int Threshold(const Consensus::Params& params) const override { return 900; }
bool Condition(const CBlockIndex* pindex, const Consensus::Params& params) const { return (pindex->nVersion & 0x100); } bool Condition(const CBlockIndex* pindex, const Consensus::Params& params) const override { return (pindex->nVersion & 0x100); }
ThresholdState GetStateFor(const CBlockIndex* pindexPrev) const { return AbstractThresholdConditionChecker::GetStateFor(pindexPrev, paramsDummy, cache); } ThresholdState GetStateFor(const CBlockIndex* pindexPrev) const { return AbstractThresholdConditionChecker::GetStateFor(pindexPrev, paramsDummy, cache); }
int GetStateSinceHeightFor(const CBlockIndex* pindexPrev) const { return AbstractThresholdConditionChecker::GetStateSinceHeightFor(pindexPrev, paramsDummy, cache); } int GetStateSinceHeightFor(const CBlockIndex* pindexPrev) const { return AbstractThresholdConditionChecker::GetStateSinceHeightFor(pindexPrev, paramsDummy, cache); }

View File

@ -74,6 +74,7 @@ protected:
public: public:
CCoinsViewDB(size_t nCacheSize, bool fMemory = false, bool fWipe = false); CCoinsViewDB(size_t nCacheSize, bool fMemory = false, bool fWipe = false);
bool GetCoin(const COutPoint &outpoint, Coin &coin) const override; bool GetCoin(const COutPoint &outpoint, Coin &coin) const override;
bool HaveCoin(const COutPoint &outpoint) const override; bool HaveCoin(const COutPoint &outpoint) const override;
uint256 GetBestBlock() const override; uint256 GetBestBlock() const override;
@ -91,12 +92,12 @@ class CCoinsViewDBCursor: public CCoinsViewCursor
public: public:
~CCoinsViewDBCursor() {} ~CCoinsViewDBCursor() {}
bool GetKey(COutPoint &key) const; bool GetKey(COutPoint &key) const override;
bool GetValue(Coin &coin) const; bool GetValue(Coin &coin) const override;
unsigned int GetValueSize() const; unsigned int GetValueSize() const override;
bool Valid() const; bool Valid() const override;
void Next(); void Next() override;
private: private:
CCoinsViewDBCursor(CDBIterator* pcursorIn, const uint256 &hashBlockIn): CCoinsViewDBCursor(CDBIterator* pcursorIn, const uint256 &hashBlockIn):

View File

@ -1988,12 +1988,12 @@ private:
public: public:
WarningBitsConditionChecker(int bitIn) : bit(bitIn) {} WarningBitsConditionChecker(int bitIn) : bit(bitIn) {}
int64_t BeginTime(const Consensus::Params& params) const { return 0; } int64_t BeginTime(const Consensus::Params& params) const override { return 0; }
int64_t EndTime(const Consensus::Params& params) const { return std::numeric_limits<int64_t>::max(); } int64_t EndTime(const Consensus::Params& params) const override { return std::numeric_limits<int64_t>::max(); }
int Period(const Consensus::Params& params) const { return params.nMinerConfirmationWindow; } int Period(const Consensus::Params& params) const override { return params.nMinerConfirmationWindow; }
int Threshold(const Consensus::Params& params) const { return params.nRuleChangeActivationThreshold; } int Threshold(const Consensus::Params& params) const override { return params.nRuleChangeActivationThreshold; }
bool Condition(const CBlockIndex* pindex, const Consensus::Params& params) const bool Condition(const CBlockIndex* pindex, const Consensus::Params& params) const override
{ {
return ((pindex->nVersion & VERSIONBITS_TOP_MASK) == VERSIONBITS_TOP_BITS) && return ((pindex->nVersion & VERSIONBITS_TOP_MASK) == VERSIONBITS_TOP_BITS) &&
((pindex->nVersion >> bit) & 1) != 0 && ((pindex->nVersion >> bit) & 1) != 0 &&

View File

@ -42,9 +42,9 @@ protected:
virtual void Inventory(const uint256 &hash) {} virtual void Inventory(const uint256 &hash) {}
virtual void ResendWalletTransactions(int64_t nBestBlockTime, CConnman* connman) {} virtual void ResendWalletTransactions(int64_t nBestBlockTime, CConnman* connman) {}
virtual void BlockChecked(const CBlock&, const CValidationState&) {} virtual void BlockChecked(const CBlock&, const CValidationState&) {}
virtual void GetScriptForMining(boost::shared_ptr<CReserveScript>&) {}; virtual void GetScriptForMining(boost::shared_ptr<CReserveScript>&) {}
virtual void ResetRequestCount(const uint256 &hash) {}; virtual void ResetRequestCount(const uint256 &hash) {}
virtual void NewPoWValidBlock(const CBlockIndex *pindex, const std::shared_ptr<const CBlock>& block) {}; virtual void NewPoWValidBlock(const CBlockIndex *pindex, const std::shared_ptr<const CBlock>& block) {}
friend void ::RegisterValidationInterface(CValidationInterface*); friend void ::RegisterValidationInterface(CValidationInterface*);
friend void ::UnregisterValidationInterface(CValidationInterface*); friend void ::UnregisterValidationInterface(CValidationInterface*);
friend void ::UnregisterAllValidationInterfaces(); friend void ::UnregisterAllValidationInterfaces();

View File

@ -153,12 +153,12 @@ private:
const Consensus::DeploymentPos id; const Consensus::DeploymentPos id;
protected: protected:
int64_t BeginTime(const Consensus::Params& params) const { return params.vDeployments[id].nStartTime; } int64_t BeginTime(const Consensus::Params& params) const override { return params.vDeployments[id].nStartTime; }
int64_t EndTime(const Consensus::Params& params) const { return params.vDeployments[id].nTimeout; } int64_t EndTime(const Consensus::Params& params) const override { return params.vDeployments[id].nTimeout; }
int Period(const Consensus::Params& params) const { return params.vDeployments[id].nWindowSize ? params.vDeployments[id].nWindowSize : params.nMinerConfirmationWindow; } int Period(const Consensus::Params& params) const override { return params.vDeployments[id].nWindowSize ? params.vDeployments[id].nWindowSize : params.nMinerConfirmationWindow; }
int Threshold(const Consensus::Params& params) const { return params.vDeployments[id].nThreshold ? params.vDeployments[id].nThreshold : params.nRuleChangeActivationThreshold; } int Threshold(const Consensus::Params& params) const override { return params.vDeployments[id].nThreshold ? params.vDeployments[id].nThreshold : params.nRuleChangeActivationThreshold; }
bool Condition(const CBlockIndex* pindex, const Consensus::Params& params) const bool Condition(const CBlockIndex* pindex, const Consensus::Params& params) const override
{ {
return (((pindex->nVersion & VERSIONBITS_TOP_MASK) == VERSIONBITS_TOP_BITS) && (pindex->nVersion & Mask(params)) != 0); return (((pindex->nVersion & VERSIONBITS_TOP_MASK) == VERSIONBITS_TOP_BITS) && (pindex->nVersion & Mask(params)) != 0);
} }

View File

@ -189,8 +189,8 @@ public:
bool Lock(bool fAllowMixing = false); bool Lock(bool fAllowMixing = false);
virtual bool AddCryptedKey(const CPubKey &vchPubKey, const std::vector<unsigned char> &vchCryptedSecret); virtual bool AddCryptedKey(const CPubKey &vchPubKey, const std::vector<unsigned char> &vchCryptedSecret);
bool AddKeyPubKey(const CKey& key, const CPubKey &pubkey); bool AddKeyPubKey(const CKey& key, const CPubKey &pubkey) override;
bool HaveKey(const CKeyID &address) const bool HaveKey(const CKeyID &address) const override
{ {
{ {
LOCK(cs_KeyStore); LOCK(cs_KeyStore);
@ -200,9 +200,9 @@ public:
} }
return false; return false;
} }
bool GetKey(const CKeyID &address, CKey& keyOut) const; bool GetKey(const CKeyID &address, CKey& keyOut) const override;
bool GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const; bool GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const override;
void GetKeys(std::set<CKeyID> &setAddress) const void GetKeys(std::set<CKeyID> &setAddress) const override
{ {
if (!IsCrypted()) if (!IsCrypted())
{ {
@ -218,7 +218,7 @@ public:
} }
} }
bool GetHDChain(CHDChain& hdChainRet) const; virtual bool GetHDChain(CHDChain& hdChainRet) const override;
/** /**
* Wallet status (encrypted, locked) changed. * Wallet status (encrypted, locked) changed.

View File

@ -877,6 +877,7 @@ public:
//! Adds a watch-only address to the store, and saves it to disk. //! Adds a watch-only address to the store, and saves it to disk.
bool AddWatchOnly(const CScript& dest, int64_t nCreateTime); bool AddWatchOnly(const CScript& dest, int64_t nCreateTime);
bool RemoveWatchOnly(const CScript &dest) override; bool RemoveWatchOnly(const CScript &dest) override;
//! Adds a watch-only address to the store, without saving it to disk (used by LoadWallet) //! Adds a watch-only address to the store, without saving it to disk (used by LoadWallet)
bool LoadWatchOnly(const CScript &dest); bool LoadWatchOnly(const CScript &dest);
@ -1142,7 +1143,7 @@ public:
void ReturnKey(); void ReturnKey();
bool GetReservedKey(CPubKey &pubkey, bool fInternalIn /*= false*/); bool GetReservedKey(CPubKey &pubkey, bool fInternalIn /*= false*/);
void KeepKey(); void KeepKey();
void KeepScript() { KeepKey(); } void KeepScript() override { KeepKey(); }
}; };

View File

@ -24,9 +24,9 @@ protected:
void Shutdown(); void Shutdown();
// CValidationInterface // CValidationInterface
void SyncTransaction(const CTransaction& tx, const CBlockIndex *pindex, int posInBlock); void SyncTransaction(const CTransaction& tx, const CBlockIndex *pindex, int posInBlock) override;
void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload); void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) override;
void NotifyTransactionLock(const CTransaction &tx); void NotifyTransactionLock(const CTransaction &tx) override;
private: private:
CZMQNotificationInterface(); CZMQNotificationInterface();

View File

@ -24,44 +24,44 @@ public:
*/ */
bool SendMessage(const char *command, const void* data, size_t size); bool SendMessage(const char *command, const void* data, size_t size);
bool Initialize(void *pcontext); bool Initialize(void *pcontext) override;
void Shutdown(); void Shutdown() override;
}; };
class CZMQPublishHashBlockNotifier : public CZMQAbstractPublishNotifier class CZMQPublishHashBlockNotifier : public CZMQAbstractPublishNotifier
{ {
public: public:
bool NotifyBlock(const CBlockIndex *pindex); bool NotifyBlock(const CBlockIndex *pindex) override;
}; };
class CZMQPublishHashTransactionNotifier : public CZMQAbstractPublishNotifier class CZMQPublishHashTransactionNotifier : public CZMQAbstractPublishNotifier
{ {
public: public:
bool NotifyTransaction(const CTransaction &transaction); bool NotifyTransaction(const CTransaction &transaction) override;
}; };
class CZMQPublishHashTransactionLockNotifier : public CZMQAbstractPublishNotifier class CZMQPublishHashTransactionLockNotifier : public CZMQAbstractPublishNotifier
{ {
public: public:
bool NotifyTransactionLock(const CTransaction &transaction); bool NotifyTransactionLock(const CTransaction &transaction) override;
}; };
class CZMQPublishRawBlockNotifier : public CZMQAbstractPublishNotifier class CZMQPublishRawBlockNotifier : public CZMQAbstractPublishNotifier
{ {
public: public:
bool NotifyBlock(const CBlockIndex *pindex); bool NotifyBlock(const CBlockIndex *pindex) override;
}; };
class CZMQPublishRawTransactionNotifier : public CZMQAbstractPublishNotifier class CZMQPublishRawTransactionNotifier : public CZMQAbstractPublishNotifier
{ {
public: public:
bool NotifyTransaction(const CTransaction &transaction); bool NotifyTransaction(const CTransaction &transaction) override;
}; };
class CZMQPublishRawTransactionLockNotifier : public CZMQAbstractPublishNotifier class CZMQPublishRawTransactionLockNotifier : public CZMQAbstractPublishNotifier
{ {
public: public:
bool NotifyTransactionLock(const CTransaction &transaction); bool NotifyTransactionLock(const CTransaction &transaction) override;
}; };
#endif // BITCOIN_ZMQ_ZMQPUBLISHNOTIFIER_H #endif // BITCOIN_ZMQ_ZMQPUBLISHNOTIFIER_H