miner: rename UpdateRequestCount signal to ResetRequestCount
This commit is contained in:
parent
5496253966
commit
a7b9623d18
4 changed files with 7 additions and 7 deletions
|
@ -411,7 +411,7 @@ static bool ProcessBlockFound(CBlock* pblock, const CChainParams& chainparams)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Inform about the new block
|
// Inform about the new block
|
||||||
GetMainSignals().BlockFound(*pblock);
|
GetMainSignals().BlockFound(pblock->GetHash());
|
||||||
|
|
||||||
// Process this block the same as if we had received it from another node
|
// Process this block the same as if we had received it from another node
|
||||||
CValidationState state;
|
CValidationState state;
|
||||||
|
|
|
@ -20,11 +20,11 @@ void RegisterValidationInterface(CValidationInterface* pwalletIn) {
|
||||||
g_signals.Broadcast.connect(boost::bind(&CValidationInterface::ResendWalletTransactions, pwalletIn, _1));
|
g_signals.Broadcast.connect(boost::bind(&CValidationInterface::ResendWalletTransactions, pwalletIn, _1));
|
||||||
g_signals.BlockChecked.connect(boost::bind(&CValidationInterface::BlockChecked, pwalletIn, _1, _2));
|
g_signals.BlockChecked.connect(boost::bind(&CValidationInterface::BlockChecked, pwalletIn, _1, _2));
|
||||||
g_signals.ScriptForMining.connect(boost::bind(&CValidationInterface::GetScriptForMining, pwalletIn, _1));
|
g_signals.ScriptForMining.connect(boost::bind(&CValidationInterface::GetScriptForMining, pwalletIn, _1));
|
||||||
g_signals.BlockFound.connect(boost::bind(&CValidationInterface::UpdateRequestCount, pwalletIn, _1));
|
g_signals.BlockFound.connect(boost::bind(&CValidationInterface::ResetRequestCount, pwalletIn, _1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnregisterValidationInterface(CValidationInterface* pwalletIn) {
|
void UnregisterValidationInterface(CValidationInterface* pwalletIn) {
|
||||||
g_signals.BlockFound.disconnect(boost::bind(&CValidationInterface::UpdateRequestCount, pwalletIn, _1));
|
g_signals.BlockFound.disconnect(boost::bind(&CValidationInterface::ResetRequestCount, pwalletIn, _1));
|
||||||
g_signals.ScriptForMining.disconnect(boost::bind(&CValidationInterface::GetScriptForMining, pwalletIn, _1));
|
g_signals.ScriptForMining.disconnect(boost::bind(&CValidationInterface::GetScriptForMining, pwalletIn, _1));
|
||||||
g_signals.BlockChecked.disconnect(boost::bind(&CValidationInterface::BlockChecked, pwalletIn, _1, _2));
|
g_signals.BlockChecked.disconnect(boost::bind(&CValidationInterface::BlockChecked, pwalletIn, _1, _2));
|
||||||
g_signals.Broadcast.disconnect(boost::bind(&CValidationInterface::ResendWalletTransactions, pwalletIn, _1));
|
g_signals.Broadcast.disconnect(boost::bind(&CValidationInterface::ResendWalletTransactions, pwalletIn, _1));
|
||||||
|
|
|
@ -37,7 +37,7 @@ protected:
|
||||||
virtual void ResendWalletTransactions(int64_t nBestBlockTime) {}
|
virtual void ResendWalletTransactions(int64_t nBestBlockTime) {}
|
||||||
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 UpdateRequestCount(const CBlock&) {};
|
virtual void ResetRequestCount(const uint256 &hash) {};
|
||||||
friend void ::RegisterValidationInterface(CValidationInterface*);
|
friend void ::RegisterValidationInterface(CValidationInterface*);
|
||||||
friend void ::UnregisterValidationInterface(CValidationInterface*);
|
friend void ::UnregisterValidationInterface(CValidationInterface*);
|
||||||
friend void ::UnregisterAllValidationInterfaces();
|
friend void ::UnregisterAllValidationInterfaces();
|
||||||
|
@ -59,7 +59,7 @@ struct CMainSignals {
|
||||||
/** Notifies listeners that a key for mining is required (coinbase) */
|
/** Notifies listeners that a key for mining is required (coinbase) */
|
||||||
boost::signals2::signal<void (boost::shared_ptr<CReserveScript>&)> ScriptForMining;
|
boost::signals2::signal<void (boost::shared_ptr<CReserveScript>&)> ScriptForMining;
|
||||||
/** Notifies listeners that a block has been successfully mined */
|
/** Notifies listeners that a block has been successfully mined */
|
||||||
boost::signals2::signal<void (const CBlock&)> BlockFound;
|
boost::signals2::signal<void (const uint256 &)> BlockFound;
|
||||||
};
|
};
|
||||||
|
|
||||||
CMainSignals& GetMainSignals();
|
CMainSignals& GetMainSignals();
|
||||||
|
|
|
@ -683,10 +683,10 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetScriptForMining(boost::shared_ptr<CReserveScript> &script);
|
void GetScriptForMining(boost::shared_ptr<CReserveScript> &script);
|
||||||
void UpdateRequestCount(const CBlock& block)
|
void ResetRequestCount(const uint256 &hash)
|
||||||
{
|
{
|
||||||
LOCK(cs_wallet);
|
LOCK(cs_wallet);
|
||||||
mapRequestCount[block.GetHash()] = 0;
|
mapRequestCount[hash] = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
unsigned int GetKeyPoolSize()
|
unsigned int GetKeyPoolSize()
|
||||||
|
|
Loading…
Reference in a new issue