diff --git a/src/coins.h b/src/coins.h --- a/src/coins.h +++ b/src/coins.h @@ -15,7 +15,6 @@ #include #include - #include /** @@ -198,11 +197,11 @@ CCoinsViewCache(CCoinsView *baseIn); // Standard CCoinsView methods - bool GetCoin(const COutPoint &outpoint, Coin &coin) const; - bool HaveCoin(const COutPoint &outpoint) const; - uint256 GetBestBlock() const; + bool GetCoin(const COutPoint &outpoint, Coin &coin) const override; + bool HaveCoin(const COutPoint &outpoint) const override; + uint256 GetBestBlock() const override; void SetBestBlock(const uint256 &hashBlock); - bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock); + bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) override; /** * Check if we have the given utxo already loaded in this cache. diff --git a/src/httprpc.cpp b/src/httprpc.cpp --- a/src/httprpc.cpp +++ b/src/httprpc.cpp @@ -18,10 +18,10 @@ #include "utilstrencodings.h" #include "utilstrencodings.h" -#include - #include // boost::trim +#include + /** WWW-Authenticate to present with 401 Unauthorized response */ static const char *WWW_AUTH_HEADER_DATA = "Basic realm=\"jsonrpc\""; @@ -46,8 +46,9 @@ class HTTPRPCTimerInterface : public RPCTimerInterface { public: HTTPRPCTimerInterface(struct event_base *_base) : base(_base) {} - const char *Name() { return "HTTP"; } - RPCTimerBase *NewTimer(std::function &func, int64_t millis) { + const char *Name() override { return "HTTP"; } + RPCTimerBase *NewTimer(std::function &func, + int64_t millis) override { return new HTTPRPCTimer(base, func, millis); } diff --git a/src/httpserver.cpp b/src/httpserver.cpp --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -12,11 +12,6 @@ #include "ui_interface.h" #include "util.h" -#include -#include -#include - -#include #include #include #include @@ -35,6 +30,11 @@ #endif #endif +#include +#include +#include +#include + /** Maximum size of http request (request line + headers) */ static const size_t MAX_HEADERS_SIZE = 8192; @@ -45,7 +45,7 @@ const std::string &_path, const HTTPRequestHandler &_func) : req(std::move(_req)), path(_path), func(_func), config(&_config) {} - void operator()() { func(*config, req.get(), path); } + void operator()() override { func(*config, req.get(), path); } std::unique_ptr req; diff --git a/src/init.cpp b/src/init.cpp --- a/src/init.cpp +++ b/src/init.cpp @@ -144,7 +144,7 @@ class CCoinsViewErrorCatcher : public CCoinsViewBacked { public: CCoinsViewErrorCatcher(CCoinsView *view) : CCoinsViewBacked(view) {} - bool GetCoin(const COutPoint &outpoint, Coin &coin) const { + bool GetCoin(const COutPoint &outpoint, Coin &coin) const override { try { return CCoinsViewBacked::GetCoin(outpoint, coin); } catch (const std::runtime_error &e) { diff --git a/src/keystore.h b/src/keystore.h --- a/src/keystore.h +++ b/src/keystore.h @@ -63,9 +63,9 @@ WatchOnlySet setWatchOnly; public: - bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey); - bool GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const; - bool HaveKey(const CKeyID &address) const { + bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey) override; + bool GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const override; + bool HaveKey(const CKeyID &address) const override { bool result; { LOCK(cs_KeyStore); @@ -73,7 +73,7 @@ } return result; } - void GetKeys(std::set &setAddress) const { + void GetKeys(std::set &setAddress) const override { setAddress.clear(); { LOCK(cs_KeyStore); @@ -84,7 +84,7 @@ } } } - bool GetKey(const CKeyID &address, CKey &keyOut) const { + bool GetKey(const CKeyID &address, CKey &keyOut) const override { { LOCK(cs_KeyStore); KeyMap::const_iterator mi = mapKeys.find(address); @@ -95,15 +95,15 @@ } return false; } - virtual bool AddCScript(const CScript &redeemScript); - virtual bool HaveCScript(const CScriptID &hash) const; + virtual bool AddCScript(const CScript &redeemScript) override; + virtual bool HaveCScript(const CScriptID &hash) const override; virtual bool GetCScript(const CScriptID &hash, - CScript &redeemScriptOut) const; + CScript &redeemScriptOut) const override; - virtual bool AddWatchOnly(const CScript &dest); - virtual bool RemoveWatchOnly(const CScript &dest); - virtual bool HaveWatchOnly(const CScript &dest) const; - virtual bool HaveWatchOnly() const; + virtual bool AddWatchOnly(const CScript &dest) override; + virtual bool RemoveWatchOnly(const CScript &dest) override; + virtual bool HaveWatchOnly(const CScript &dest) const override; + virtual bool HaveWatchOnly() const override; }; typedef std::vector> CKeyingMaterial; diff --git a/src/net_processing.h b/src/net_processing.h --- a/src/net_processing.h +++ b/src/net_processing.h @@ -35,14 +35,16 @@ PeerLogicValidation(CConnman *connmanIn); virtual void SyncTransaction(const CTransaction &tx, - const CBlockIndex *pindex, int nPosInBlock); + const CBlockIndex *pindex, + int nPosInBlock) override; virtual void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, - bool fInitialDownload); + bool fInitialDownload) override; virtual void BlockChecked(const CBlock &block, - const CValidationState &state); - virtual void NewPoWValidBlock(const CBlockIndex *pindex, - const std::shared_ptr &pblock); + const CValidationState &state) override; + virtual void + NewPoWValidBlock(const CBlockIndex *pindex, + const std::shared_ptr &pblock) override; }; struct CNodeStateStats { diff --git a/src/qt/bitcoinaddressvalidator.h b/src/qt/bitcoinaddressvalidator.h --- a/src/qt/bitcoinaddressvalidator.h +++ b/src/qt/bitcoinaddressvalidator.h @@ -19,7 +19,7 @@ explicit BitcoinAddressEntryValidator(const std::string &cashaddrprefix, QObject *parent); - State validate(QString &input, int &pos) const; + State validate(QString &input, int &pos) const override; private: std::string cashaddrprefix; @@ -33,7 +33,7 @@ public: explicit BitcoinAddressCheckValidator(QObject *parent); - State validate(QString &input, int &pos) const; + State validate(QString &input, int &pos) const override; }; #endif // BITCOIN_QT_BITCOINADDRESSVALIDATOR_H diff --git a/src/qt/bitcoinamountfield.cpp b/src/qt/bitcoinamountfield.cpp --- a/src/qt/bitcoinamountfield.cpp +++ b/src/qt/bitcoinamountfield.cpp @@ -31,8 +31,10 @@ SIGNAL(valueChanged())); } - QValidator::State validate(QString &text, int &pos) const { - if (text.isEmpty()) return QValidator::Intermediate; + QValidator::State validate(QString &text, int &pos) const override { + if (text.isEmpty()) { + return QValidator::Intermediate; + } bool valid = false; parse(text, &valid); // Make sure we return Intermediate so that fixup() is called on @@ -40,7 +42,7 @@ return valid ? QValidator::Intermediate : QValidator::Invalid; } - void fixup(QString &input) const { + void fixup(QString &input) const override { bool valid = false; CAmount val = parse(input, &valid); if (valid) { @@ -60,7 +62,7 @@ Q_EMIT valueChanged(); } - void stepBy(int steps) { + void stepBy(int steps) override { bool valid = false; Amount val(value(&valid)); val = val + steps * singleStep; @@ -74,15 +76,16 @@ currentUnit = unit; - if (valid) + if (valid) { setValue(val.GetSatoshis()); - else + } else { clear(); + } } void setSingleStep(const CAmount &step) { singleStep = step; } - QSize minimumSizeHint() const { + QSize minimumSizeHint() const override { if (cachedMinimumSizeHint.isEmpty()) { ensurePolished(); @@ -149,7 +152,7 @@ } protected: - bool event(QEvent *event) { + bool event(QEvent *event) override { if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) { QKeyEvent *keyEvent = static_cast(event); @@ -164,7 +167,7 @@ return QAbstractSpinBox::event(event); } - StepEnabled stepEnabled() const { + StepEnabled stepEnabled() const override { if (isReadOnly()) { // Disable steps when AmountSpinBox is read-only. return StepNone; diff --git a/src/qt/bitcoinunits.h b/src/qt/bitcoinunits.h --- a/src/qt/bitcoinunits.h +++ b/src/qt/bitcoinunits.h @@ -101,8 +101,8 @@ /** Unit identifier */ UnitRole = Qt::UserRole }; - int rowCount(const QModelIndex &parent) const; - QVariant data(const QModelIndex &index, int role) const; + int rowCount(const QModelIndex &parent) const override; + QVariant data(const QModelIndex &index, int role) const override; ///@} static QString removeSpaces(QString text) { diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -841,7 +841,7 @@ protected: virtual void BlockChecked(const CBlock &block, - const CValidationState &stateIn) { + const CValidationState &stateIn) override { if (block.GetHash() != hash) { return; } diff --git a/src/script/interpreter.h b/src/script/interpreter.h --- a/src/script/interpreter.h +++ b/src/script/interpreter.h @@ -166,9 +166,9 @@ : txTo(txToIn), nIn(nInIn), amount(amountIn), txdata(&txdataIn) {} bool CheckSig(const std::vector &scriptSig, const std::vector &vchPubKey, - const CScript &scriptCode, uint32_t flags) const; - bool CheckLockTime(const CScriptNum &nLockTime) const; - bool CheckSequence(const CScriptNum &nSequence) const; + const CScript &scriptCode, uint32_t flags) const override; + bool CheckLockTime(const CScriptNum &nLockTime) const override; + bool CheckSequence(const CScriptNum &nSequence) const override; }; class MutableTransactionSignatureChecker : public TransactionSignatureChecker { diff --git a/src/script/sigcache.h b/src/script/sigcache.h --- a/src/script/sigcache.h +++ b/src/script/sigcache.h @@ -53,7 +53,7 @@ bool VerifySignature(const std::vector &vchSig, const CPubKey &vchPubKey, - const uint256 &sighash) const; + const uint256 &sighash) const override; }; void InitSignatureCache(); diff --git a/src/script/sign.h b/src/script/sign.h --- a/src/script/sign.h +++ b/src/script/sign.h @@ -43,9 +43,9 @@ const CTransaction *txToIn, unsigned int nInIn, const Amount amountIn, uint32_t nHashTypeIn = SIGHASH_ALL); - const BaseSignatureChecker &Checker() const { return checker; } + const BaseSignatureChecker &Checker() const override { return checker; } bool CreateSig(std::vector &vchSig, const CKeyID &keyid, - const CScript &scriptCode) const; + const CScript &scriptCode) const override; }; class MutableTransactionSignatureCreator : public TransactionSignatureCreator { @@ -66,9 +66,9 @@ public: DummySignatureCreator(const CKeyStore *keystoreIn) : BaseSignatureCreator(keystoreIn) {} - const BaseSignatureChecker &Checker() const; + const BaseSignatureChecker &Checker() const override; bool CreateSig(std::vector &vchSig, const CKeyID &keyid, - const CScript &scriptCode) const; + const CScript &scriptCode) const override; }; struct SignatureData { diff --git a/src/script/sign.cpp b/src/script/sign.cpp --- a/src/script/sign.cpp +++ b/src/script/sign.cpp @@ -359,7 +359,7 @@ bool CheckSig(const std::vector &scriptSig, const std::vector &vchPubKey, - const CScript &scriptCode, uint32_t flags) const { + const CScript &scriptCode, uint32_t flags) const override { return true; } }; diff --git a/src/support/lockedpool.cpp b/src/support/lockedpool.cpp --- a/src/support/lockedpool.cpp +++ b/src/support/lockedpool.cpp @@ -143,9 +143,9 @@ class Win32LockedPageAllocator : public LockedPageAllocator { public: Win32LockedPageAllocator(); - void *AllocateLocked(size_t len, bool *lockingSuccess); - void FreeLocked(void *addr, size_t len); - size_t GetLimit(); + void *AllocateLocked(size_t len, bool *lockingSuccess) override; + void FreeLocked(void *addr, size_t len) override; + size_t GetLimit() override; private: size_t page_size; @@ -194,9 +194,9 @@ class PosixLockedPageAllocator : public LockedPageAllocator { public: PosixLockedPageAllocator(); - void *AllocateLocked(size_t len, bool *lockingSuccess); - void FreeLocked(void *addr, size_t len); - size_t GetLimit(); + void *AllocateLocked(size_t len, bool *lockingSuccess) override; + void FreeLocked(void *addr, size_t len) override; + size_t GetLimit() override; private: size_t page_size; diff --git a/src/test/addrman_tests.cpp b/src/test/addrman_tests.cpp --- a/src/test/addrman_tests.cpp +++ b/src/test/addrman_tests.cpp @@ -22,7 +22,7 @@ insecure_rand = FastRandomContext(true); } - int RandomInt(int nMax) { + int RandomInt(int nMax) override { state = (CHashWriter(SER_GETHASH, 0) << state).GetHash().GetCheapHash(); return (unsigned int)(state % nMax); } diff --git a/src/test/allocator_tests.cpp b/src/test/allocator_tests.cpp --- a/src/test/allocator_tests.cpp +++ b/src/test/allocator_tests.cpp @@ -134,7 +134,7 @@ public: TestLockedPageAllocator(int count_in, int lockedcount_in) : count(count_in), lockedcount(lockedcount_in) {} - void *AllocateLocked(size_t len, bool *lockingSuccess) { + void *AllocateLocked(size_t len, bool *lockingSuccess) override { *lockingSuccess = false; if (count > 0) { --count; @@ -149,8 +149,8 @@ } return 0; } - void FreeLocked(void *addr, size_t len) {} - size_t GetLimit() { return std::numeric_limits::max(); } + void FreeLocked(void *addr, size_t len) override {} + size_t GetLimit() override { return std::numeric_limits::max(); } private: int count; diff --git a/src/test/coins_tests.cpp b/src/test/coins_tests.cpp --- a/src/test/coins_tests.cpp +++ b/src/test/coins_tests.cpp @@ -35,7 +35,7 @@ std::map map_; public: - bool GetCoin(const COutPoint &outpoint, Coin &coin) const { + bool GetCoin(const COutPoint &outpoint, Coin &coin) const override { std::map::const_iterator it = map_.find(outpoint); if (it == map_.end()) { return false; @@ -48,14 +48,14 @@ return true; } - bool HaveCoin(const COutPoint &outpoint) const { + bool HaveCoin(const COutPoint &outpoint) const override { Coin coin; return GetCoin(outpoint, coin); } - uint256 GetBestBlock() const { return hashBestBlock_; } + uint256 GetBestBlock() const override { return hashBestBlock_; } - bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) { + bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) override { for (CCoinsMap::iterator it = mapCoins.begin(); it != mapCoins.end();) { if (it->second.flags & CCoinsCacheEntry::DIRTY) { // Same optimization used in CCoinsViewDB is to only write dirty diff --git a/src/test/net_tests.cpp b/src/test/net_tests.cpp --- a/src/test/net_tests.cpp +++ b/src/test/net_tests.cpp @@ -28,12 +28,12 @@ class CAddrManUncorrupted : public CAddrManSerializationMock { public: - void Serialize(CDataStream &s) const { CAddrMan::Serialize(s); } + void Serialize(CDataStream &s) const override { CAddrMan::Serialize(s); } }; class CAddrManCorrupted : public CAddrManSerializationMock { 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. uint8_t nVersion = 1; diff --git a/src/test/versionbits_tests.cpp b/src/test/versionbits_tests.cpp --- a/src/test/versionbits_tests.cpp +++ b/src/test/versionbits_tests.cpp @@ -25,16 +25,18 @@ mutable ThresholdConditionCache cache; public: - int64_t BeginTime(const Consensus::Params ¶ms) const { + int64_t BeginTime(const Consensus::Params ¶ms) const override { return TestTime(10000); } - int64_t EndTime(const Consensus::Params ¶ms) const { + int64_t EndTime(const Consensus::Params ¶ms) const override { return TestTime(20000); } - int Period(const Consensus::Params ¶ms) const { return 1000; } - int Threshold(const Consensus::Params ¶ms) const { return 900; } + int Period(const Consensus::Params ¶ms) const override { return 1000; } + int Threshold(const Consensus::Params ¶ms) const override { + return 900; + } bool Condition(const CBlockIndex *pindex, - const Consensus::Params ¶ms) const { + const Consensus::Params ¶ms) const override { return (pindex->nVersion & 0x100); } diff --git a/src/txdb.h b/src/txdb.h --- a/src/txdb.h +++ b/src/txdb.h @@ -64,7 +64,7 @@ }; /** CCoinsView backed by the coin database (chainstate/) */ -class CCoinsViewDB : public CCoinsView { +class CCoinsViewDB final : public CCoinsView { protected: CDBWrapper db; @@ -88,12 +88,12 @@ public: ~CCoinsViewDBCursor() {} - bool GetKey(COutPoint &key) const; - bool GetValue(Coin &coin) const; - unsigned int GetValueSize() const; + bool GetKey(COutPoint &key) const override; + bool GetValue(Coin &coin) const override; + unsigned int GetValueSize() const override; - bool Valid() const; - void Next(); + bool Valid() const override; + void Next() override; private: CCoinsViewDBCursor(CDBIterator *pcursorIn, const uint256 &hashBlockIn) diff --git a/src/txdb.cpp b/src/txdb.cpp --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -11,10 +11,10 @@ #include "pow.h" #include "uint256.h" -#include - #include +#include + static const char DB_COIN = 'C'; static const char DB_COINS = 'c'; static const char DB_BLOCK_FILES = 'f'; diff --git a/src/txmempool.h b/src/txmempool.h --- a/src/txmempool.h +++ b/src/txmempool.h @@ -6,13 +6,6 @@ #ifndef BITCOIN_TXMEMPOOL_H #define BITCOIN_TXMEMPOOL_H -#include -#include -#include -#include -#include -#include - #include "amount.h" #include "coins.h" #include "indirectmap.h" @@ -25,6 +18,13 @@ #include #include +#include +#include +#include +#include +#include +#include + class CAutoFile; class CBlockIndex; class Config; @@ -795,8 +795,8 @@ public: CCoinsViewMemPool(CCoinsView *baseIn, const CTxMemPool &mempoolIn); - bool GetCoin(const COutPoint &outpoint, Coin &coin) const; - bool HaveCoin(const COutPoint &outpoint) const; + bool GetCoin(const COutPoint &outpoint, Coin &coin) const override; + bool HaveCoin(const COutPoint &outpoint) const override; }; // We want to sort transactions by coin age priority diff --git a/src/validation.cpp b/src/validation.cpp --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1778,19 +1778,21 @@ public: WarningBitsConditionChecker(int bitIn) : bit(bitIn) {} - int64_t BeginTime(const Consensus::Params ¶ms) const { return 0; } - int64_t EndTime(const Consensus::Params ¶ms) const { + int64_t BeginTime(const Consensus::Params ¶ms) const override { + return 0; + } + int64_t EndTime(const Consensus::Params ¶ms) const override { return std::numeric_limits::max(); } - int Period(const Consensus::Params ¶ms) const { + int Period(const Consensus::Params ¶ms) const override { return params.nMinerConfirmationWindow; } - int Threshold(const Consensus::Params ¶ms) const { + int Threshold(const Consensus::Params ¶ms) const override { return params.nRuleChangeActivationThreshold; } bool Condition(const CBlockIndex *pindex, - const Consensus::Params ¶ms) const { + const Consensus::Params ¶ms) const override { return ((pindex->nVersion & VERSIONBITS_TOP_MASK) == VERSIONBITS_TOP_BITS) && ((pindex->nVersion >> bit) & 1) != 0 && diff --git a/src/versionbits.cpp b/src/versionbits.cpp --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -156,21 +156,21 @@ const Consensus::DeploymentPos id; protected: - int64_t BeginTime(const Consensus::Params ¶ms) const { + int64_t BeginTime(const Consensus::Params ¶ms) const override { return params.vDeployments[id].nStartTime; } - int64_t EndTime(const Consensus::Params ¶ms) const { + int64_t EndTime(const Consensus::Params ¶ms) const override { return params.vDeployments[id].nTimeout; } - int Period(const Consensus::Params ¶ms) const { + int Period(const Consensus::Params ¶ms) const override { return params.nMinerConfirmationWindow; } - int Threshold(const Consensus::Params ¶ms) const { + int Threshold(const Consensus::Params ¶ms) const override { return params.nRuleChangeActivationThreshold; } bool Condition(const CBlockIndex *pindex, - const Consensus::Params ¶ms) const { + const Consensus::Params ¶ms) const override { return (((pindex->nVersion & VERSIONBITS_TOP_MASK) == VERSIONBITS_TOP_BITS) && (pindex->nVersion & Mask(params)) != 0); diff --git a/src/wallet/crypter.h b/src/wallet/crypter.h --- a/src/wallet/crypter.h +++ b/src/wallet/crypter.h @@ -155,18 +155,18 @@ virtual bool AddCryptedKey(const CPubKey &vchPubKey, const std::vector &vchCryptedSecret); - bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey); - bool HaveKey(const CKeyID &address) const { - { - LOCK(cs_KeyStore); - if (!IsCrypted()) return CBasicKeyStore::HaveKey(address); - return mapCryptedKeys.count(address) > 0; + bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey) override; + bool HaveKey(const CKeyID &address) const override { + LOCK(cs_KeyStore); + if (!IsCrypted()) { + return CBasicKeyStore::HaveKey(address); } - return false; + + return mapCryptedKeys.count(address) > 0; } - bool GetKey(const CKeyID &address, CKey &keyOut) const; - bool GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const; - void GetKeys(std::set &setAddress) const { + bool GetKey(const CKeyID &address, CKey &keyOut) const override; + bool GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const override; + void GetKeys(std::set &setAddress) const override { if (!IsCrypted()) { CBasicKeyStore::GetKeys(setAddress); return; diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -18,6 +18,8 @@ #include "wallet/rpcwallet.h" #include "wallet/walletdb.h" +#include + #include #include #include @@ -28,8 +30,6 @@ #include #include -#include - extern CWallet *pwalletMain; /** @@ -1078,7 +1078,7 @@ void ReturnKey(); bool GetReservedKey(CPubKey &pubkey); void KeepKey(); - void KeepScript() { KeepKey(); } + void KeepScript() override { KeepKey(); } }; /** diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -28,12 +28,12 @@ #include "wallet/coincontrol.h" #include "wallet/finaltx.h" -#include - #include #include #include +#include + CWallet *pwalletMain = nullptr; /** Transaction fee set by the user */ diff --git a/src/zmq/zmqnotificationinterface.h b/src/zmq/zmqnotificationinterface.h --- a/src/zmq/zmqnotificationinterface.h +++ b/src/zmq/zmqnotificationinterface.h @@ -6,6 +6,7 @@ #define BITCOIN_ZMQ_ZMQNOTIFICATIONINTERFACE_H #include "validationinterface.h" + #include #include @@ -24,9 +25,10 @@ // CValidationInterface void SyncTransaction(const CTransaction &tx, const CBlockIndex *pindex, - int posInBlock); + int posInBlock) override; void UpdatedBlockTip(const CBlockIndex *pindexNew, - const CBlockIndex *pindexFork, bool fInitialDownload); + const CBlockIndex *pindexFork, + bool fInitialDownload) override; private: CZMQNotificationInterface(); diff --git a/src/zmq/zmqpublishnotifier.h b/src/zmq/zmqpublishnotifier.h --- a/src/zmq/zmqpublishnotifier.h +++ b/src/zmq/zmqpublishnotifier.h @@ -23,28 +23,28 @@ */ bool SendMessage(const char *command, const void *data, size_t size); - bool Initialize(void *pcontext); - void Shutdown(); + bool Initialize(void *pcontext) override; + void Shutdown() override; }; class CZMQPublishHashBlockNotifier : public CZMQAbstractPublishNotifier { public: - bool NotifyBlock(const CBlockIndex *pindex); + bool NotifyBlock(const CBlockIndex *pindex) override; }; class CZMQPublishHashTransactionNotifier : public CZMQAbstractPublishNotifier { public: - bool NotifyTransaction(const CTransaction &transaction); + bool NotifyTransaction(const CTransaction &transaction) override; }; class CZMQPublishRawBlockNotifier : public CZMQAbstractPublishNotifier { public: - bool NotifyBlock(const CBlockIndex *pindex); + bool NotifyBlock(const CBlockIndex *pindex) override; }; class CZMQPublishRawTransactionNotifier : public CZMQAbstractPublishNotifier { public: - bool NotifyTransaction(const CTransaction &transaction); + bool NotifyTransaction(const CTransaction &transaction) override; }; #endif // BITCOIN_ZMQ_ZMQPUBLISHNOTIFIER_H