Skip to content

Commit a7b9623

Browse files
committed
miner: rename UpdateRequestCount signal to ResetRequestCount
1 parent 5496253 commit a7b9623

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/miner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ static bool ProcessBlockFound(CBlock* pblock, const CChainParams& chainparams)
411411
}
412412

413413
// Inform about the new block
414-
GetMainSignals().BlockFound(*pblock);
414+
GetMainSignals().BlockFound(pblock->GetHash());
415415

416416
// Process this block the same as if we had received it from another node
417417
CValidationState state;

src/validationinterface.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ void RegisterValidationInterface(CValidationInterface* pwalletIn) {
2020
g_signals.Broadcast.connect(boost::bind(&CValidationInterface::ResendWalletTransactions, pwalletIn, _1));
2121
g_signals.BlockChecked.connect(boost::bind(&CValidationInterface::BlockChecked, pwalletIn, _1, _2));
2222
g_signals.ScriptForMining.connect(boost::bind(&CValidationInterface::GetScriptForMining, pwalletIn, _1));
23-
g_signals.BlockFound.connect(boost::bind(&CValidationInterface::UpdateRequestCount, pwalletIn, _1));
23+
g_signals.BlockFound.connect(boost::bind(&CValidationInterface::ResetRequestCount, pwalletIn, _1));
2424
}
2525

2626
void UnregisterValidationInterface(CValidationInterface* pwalletIn) {
27-
g_signals.BlockFound.disconnect(boost::bind(&CValidationInterface::UpdateRequestCount, pwalletIn, _1));
27+
g_signals.BlockFound.disconnect(boost::bind(&CValidationInterface::ResetRequestCount, pwalletIn, _1));
2828
g_signals.ScriptForMining.disconnect(boost::bind(&CValidationInterface::GetScriptForMining, pwalletIn, _1));
2929
g_signals.BlockChecked.disconnect(boost::bind(&CValidationInterface::BlockChecked, pwalletIn, _1, _2));
3030
g_signals.Broadcast.disconnect(boost::bind(&CValidationInterface::ResendWalletTransactions, pwalletIn, _1));

src/validationinterface.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class CValidationInterface {
3737
virtual void ResendWalletTransactions(int64_t nBestBlockTime) {}
3838
virtual void BlockChecked(const CBlock&, const CValidationState&) {}
3939
virtual void GetScriptForMining(boost::shared_ptr<CReserveScript>&) {};
40-
virtual void UpdateRequestCount(const CBlock&) {};
40+
virtual void ResetRequestCount(const uint256 &hash) {};
4141
friend void ::RegisterValidationInterface(CValidationInterface*);
4242
friend void ::UnregisterValidationInterface(CValidationInterface*);
4343
friend void ::UnregisterAllValidationInterfaces();
@@ -59,7 +59,7 @@ struct CMainSignals {
5959
/** Notifies listeners that a key for mining is required (coinbase) */
6060
boost::signals2::signal<void (boost::shared_ptr<CReserveScript>&)> ScriptForMining;
6161
/** Notifies listeners that a block has been successfully mined */
62-
boost::signals2::signal<void (const CBlock&)> BlockFound;
62+
boost::signals2::signal<void (const uint256 &)> BlockFound;
6363
};
6464

6565
CMainSignals& GetMainSignals();

src/wallet/wallet.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,10 +683,10 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
683683
}
684684

685685
void GetScriptForMining(boost::shared_ptr<CReserveScript> &script);
686-
void UpdateRequestCount(const CBlock& block)
686+
void ResetRequestCount(const uint256 &hash)
687687
{
688688
LOCK(cs_wallet);
689-
mapRequestCount[block.GetHash()] = 0;
689+
mapRequestCount[hash] = 0;
690690
};
691691

692692
unsigned int GetKeyPoolSize()

0 commit comments

Comments
 (0)