Skip to content

Commit

Permalink
Remove dead-code tracking of requests for blocks we generated
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBlueMatt authored and furszy committed Jan 28, 2021
1 parent 10ccbbf commit d77244c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
3 changes: 0 additions & 3 deletions src/miner.cpp
Expand Up @@ -521,9 +521,6 @@ bool ProcessBlockFound(const std::shared_ptr<const CBlock>& pblock, CWallet& wal
if (reservekey)
reservekey->KeepKey();

// Inform about the new block
GetMainSignals().BlockFound(pblock->GetHash());

// Process this block the same as if we had received it from another node
CValidationState state;
if (!ProcessNewBlock(state, nullptr, pblock, nullptr)) {
Expand Down
8 changes: 0 additions & 8 deletions src/validationinterface.cpp
Expand Up @@ -19,7 +19,6 @@ struct ValidationInterfaceConnections {
boost::signals2::scoped_connection SetBestChain;
boost::signals2::scoped_connection Broadcast;
boost::signals2::scoped_connection BlockChecked;
boost::signals2::scoped_connection BlockFound;
boost::signals2::scoped_connection ChainTip;
};

Expand All @@ -46,8 +45,6 @@ struct MainSignalsInstance {
boost::signals2::signal<void (CConnman* connman)> Broadcast;
/** Notifies listeners of a block validation result */
boost::signals2::signal<void (const CBlock&, const CValidationState&)> BlockChecked;
/** Notifies listeners that a block has been successfully mined */
boost::signals2::signal<void (const uint256 &)> BlockFound;

/** Notifies listeners of a change to the tip of the active block chain. */
boost::signals2::signal<void (const CBlockIndex *, const CBlock *, Optional<SaplingMerkleTree>)> ChainTip;
Expand Down Expand Up @@ -79,7 +76,6 @@ void RegisterValidationInterface(CValidationInterface* pwalletIn)
conns.SetBestChain = g_signals.m_internals->SetBestChain.connect(std::bind(&CValidationInterface::SetBestChain, pwalletIn, std::placeholders::_1));
conns.Broadcast = g_signals.m_internals->Broadcast.connect(std::bind(&CValidationInterface::ResendWalletTransactions, pwalletIn, std::placeholders::_1));
conns.BlockChecked = g_signals.m_internals->BlockChecked.connect(std::bind(&CValidationInterface::BlockChecked, pwalletIn, std::placeholders::_1, std::placeholders::_2));
conns.BlockFound = g_signals.m_internals->BlockFound.connect(std::bind(&CValidationInterface::ResetRequestCount, pwalletIn, std::placeholders::_1));
}

void UnregisterValidationInterface(CValidationInterface* pwalletIn)
Expand Down Expand Up @@ -133,10 +129,6 @@ void CMainSignals::BlockChecked(const CBlock& block, const CValidationState& sta
m_internals->BlockChecked(block, state);
}

void CMainSignals::BlockFound(const uint256& hash) {
m_internals->BlockFound(hash);
}

void CMainSignals::ChainTip(const CBlockIndex* pindex, const CBlock* block, Optional<SaplingMerkleTree> tree) {
m_internals->ChainTip(pindex, block, tree);
}
2 changes: 0 additions & 2 deletions src/validationinterface.h
Expand Up @@ -43,7 +43,6 @@ class CValidationInterface {
/** Tells listeners to broadcast their data. */
virtual void ResendWalletTransactions(CConnman* connman) {}
virtual void BlockChecked(const CBlock&, const CValidationState&) {}
virtual void ResetRequestCount(const uint256 &hash) {};
friend void ::RegisterValidationInterface(CValidationInterface*);
friend void ::UnregisterValidationInterface(CValidationInterface*);
friend void ::UnregisterAllValidationInterfaces();
Expand All @@ -69,7 +68,6 @@ class CMainSignals {
void SetBestChain(const CBlockLocator &);
void Broadcast(CConnman* connman);
void BlockChecked(const CBlock&, const CValidationState&);
void BlockFound(const uint256&);
void ChainTip(const CBlockIndex *, const CBlock *, Optional<SaplingMerkleTree>);
};

Expand Down

0 comments on commit d77244c

Please sign in to comment.