diff options
author | Jonas Schnelli <jonas.schnelli@include7.ch> | 2015-07-01 16:06:49 +0200 |
---|---|---|
committer | Jonas Schnelli <jonas.schnelli@include7.ch> | 2015-07-01 16:09:58 +0200 |
commit | a7b9623d189eb4a7d37ff7ad706d6385c3a38e80 (patch) | |
tree | 5c8e0ff2ebbc89c965c4a5869332cae6b45489ea | |
parent | 5496253966abec287ea61a648cb518d14903f91f (diff) |
miner: rename UpdateRequestCount signal to ResetRequestCount
-rw-r--r-- | src/miner.cpp | 2 | ||||
-rw-r--r-- | src/validationinterface.cpp | 4 | ||||
-rw-r--r-- | src/validationinterface.h | 4 | ||||
-rw-r--r-- | src/wallet/wallet.h | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/miner.cpp b/src/miner.cpp index 46cde91a4d..2c5cba742c 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -411,7 +411,7 @@ static bool ProcessBlockFound(CBlock* pblock, const CChainParams& chainparams) } // 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 CValidationState state; diff --git a/src/validationinterface.cpp b/src/validationinterface.cpp index 96f2779150..d365f03008 100644 --- a/src/validationinterface.cpp +++ b/src/validationinterface.cpp @@ -20,11 +20,11 @@ void RegisterValidationInterface(CValidationInterface* pwalletIn) { g_signals.Broadcast.connect(boost::bind(&CValidationInterface::ResendWalletTransactions, pwalletIn, _1)); g_signals.BlockChecked.connect(boost::bind(&CValidationInterface::BlockChecked, pwalletIn, _1, _2)); 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) { - 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.BlockChecked.disconnect(boost::bind(&CValidationInterface::BlockChecked, pwalletIn, _1, _2)); g_signals.Broadcast.disconnect(boost::bind(&CValidationInterface::ResendWalletTransactions, pwalletIn, _1)); diff --git a/src/validationinterface.h b/src/validationinterface.h index 34acd40165..fb0ce0bdaa 100644 --- a/src/validationinterface.h +++ b/src/validationinterface.h @@ -37,7 +37,7 @@ protected: virtual void ResendWalletTransactions(int64_t nBestBlockTime) {} virtual void BlockChecked(const CBlock&, const CValidationState&) {} virtual void GetScriptForMining(boost::shared_ptr<CReserveScript>&) {}; - virtual void UpdateRequestCount(const CBlock&) {}; + virtual void ResetRequestCount(const uint256 &hash) {}; friend void ::RegisterValidationInterface(CValidationInterface*); friend void ::UnregisterValidationInterface(CValidationInterface*); friend void ::UnregisterAllValidationInterfaces(); @@ -59,7 +59,7 @@ struct CMainSignals { /** Notifies listeners that a key for mining is required (coinbase) */ boost::signals2::signal<void (boost::shared_ptr<CReserveScript>&)> ScriptForMining; /** 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(); diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 1774596af1..f36c98e9fc 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -683,10 +683,10 @@ public: } void GetScriptForMining(boost::shared_ptr<CReserveScript> &script); - void UpdateRequestCount(const CBlock& block) + void ResetRequestCount(const uint256 &hash) { LOCK(cs_wallet); - mapRequestCount[block.GetHash()] = 0; + mapRequestCount[hash] = 0; }; unsigned int GetKeyPoolSize() |