Skip to content

Commit

Permalink
fix compiler warning member functions not marked as 'override'
Browse files Browse the repository at this point in the history
  • Loading branch information
furszy committed Jan 28, 2021
1 parent d3867a7 commit 1a45036
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/net_processing.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class PeerLogicValidation : public CValidationInterface {
PeerLogicValidation(CConnman* connmanIn);
~PeerLogicValidation() = default;

virtual void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload);
virtual void BlockChecked(const CBlock& block, const CValidationState& state);
void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) override;
void BlockChecked(const CBlock& block, const CValidationState& state) override;
};

struct CNodeStateStats {
Expand Down
18 changes: 9 additions & 9 deletions src/wallet/wallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
//////////// End Sapling //////////////

//! Adds a key to the store, and saves it to disk.
bool AddKeyPubKey(const CKey& key, const CPubKey& pubkey);
bool AddKeyPubKey(const CKey& key, const CPubKey& pubkey) override;
//! Adds a key to the store, without saving it to disk (used by LoadWallet)
bool LoadKey(const CKey& key, const CPubKey& pubkey) { return CCryptoKeyStore::AddKeyPubKey(key, pubkey); }
//! Load metadata (used by LoadWallet)
Expand All @@ -563,10 +563,10 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
bool LoadMinVersion(int nVersion);

//! Adds an encrypted key to the store, and saves it to disk.
bool AddCryptedKey(const CPubKey& vchPubKey, const std::vector<unsigned char>& vchCryptedSecret);
bool AddCryptedKey(const CPubKey& vchPubKey, const std::vector<unsigned char>& vchCryptedSecret) override;
//! Adds an encrypted key to the store, without saving it to disk (used by LoadWallet)
bool LoadCryptedKey(const CPubKey& vchPubKey, const std::vector<unsigned char>& vchCryptedSecret);
bool AddCScript(const CScript& redeemScript);
bool AddCScript(const CScript& redeemScript) override;
bool LoadCScript(const CScript& redeemScript);

//! Adds a destination data tuple to the store, and saves it to disk
Expand All @@ -577,8 +577,8 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
bool LoadDestData(const CTxDestination& dest, const std::string& key, const std::string& value);

//! Adds a watch-only address to the store, and saves it to disk.
bool AddWatchOnly(const CScript& dest);
bool RemoveWatchOnly(const CScript& dest);
bool AddWatchOnly(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)
bool LoadWatchOnly(const CScript& dest);

Expand Down Expand Up @@ -615,7 +615,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface

int ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate = false, bool fromStartup = false);
void ReacceptWalletTransactions(bool fFirstLoad = false);
void ResendWalletTransactions(CConnman* connman);
void ResendWalletTransactions(CConnman* connman) override;

CAmount loopTxsBalance(std::function<void(const uint256&, const CWalletTx&, CAmount&)>method) const;
CAmount GetAvailableBalance(bool fIncludeDelegated = true, bool fIncludeShielded = true) const;
Expand Down Expand Up @@ -727,9 +727,9 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
//! Sapling merkle tree update
void ChainTip(const CBlockIndex *pindex,
const CBlock *pblock,
Optional<SaplingMerkleTree> added);
Optional<SaplingMerkleTree> added) override;

void SetBestChain(const CBlockLocator& loc);
void SetBestChain(const CBlockLocator& loc) override;
void SetBestChainInternal(CWalletDB& walletdb, const CBlockLocator& loc); // only public for testing purposes, must never be called directly in any other situation
// Force balance recomputation if any transaction got conflicted
void MarkAffectedTransactionsDirty(const CTransaction& tx); // only public for testing purposes, must never be called directly in any other situation
Expand All @@ -753,7 +753,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
void LoadAddressBookName(const CWDestination& dest, const std::string& strName);
void LoadAddressBookPurpose(const CWDestination& dest, const std::string& strPurpose);

bool UpdatedTransaction(const uint256& hashTx);
bool UpdatedTransaction(const uint256& hashTx) override;

unsigned int GetKeyPoolSize();
unsigned int GetStakingKeyPoolSize();
Expand Down
10 changes: 5 additions & 5 deletions src/zmq/zmqnotificationinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ class CZMQNotificationInterface : public CValidationInterface
void Shutdown();

// CValidationInterface
void TransactionAddedToMempool(const CTransactionRef& tx);
void BlockConnected(const std::shared_ptr<const CBlock>& pblock, const CBlockIndex* pindexConnected, const std::vector<CTransactionRef>& vtxConflicted);
void BlockDisconnected(const std::shared_ptr<const CBlock>& pblock);
void NotifyTransactionLock(const CTransaction &tx);
void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload);
void TransactionAddedToMempool(const CTransactionRef& tx) override;
void BlockConnected(const std::shared_ptr<const CBlock>& pblock, const CBlockIndex* pindexConnected, const std::vector<CTransactionRef>& vtxConflicted) override;
void BlockDisconnected(const std::shared_ptr<const CBlock>& pblock) override;
void NotifyTransactionLock(const CTransaction &tx) override;
void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) override;

private:
CZMQNotificationInterface();
Expand Down

0 comments on commit 1a45036

Please sign in to comment.