refactor: Remove unused bool parameter in RPCNotifyBlockChange()
This commit is contained in:
3 files changed
+5
-5
No files matched your search
+3
-3
@@ -351,13 +351,13 @@ static void registerSignalHandler(int signal, void(*handler)(int))
|
|||||||
static boost::signals2::connection rpc_notify_block_change_connection;
|
static boost::signals2::connection rpc_notify_block_change_connection;
|
||||||
static void OnRPCStarted()
|
static void OnRPCStarted()
|
||||||
{
|
{
|
||||||
rpc_notify_block_change_connection = uiInterface.NotifyBlockTip_connect(&RPCNotifyBlockChange);
|
rpc_notify_block_change_connection = uiInterface.NotifyBlockTip_connect(std::bind(RPCNotifyBlockChange, std::placeholders::_2));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void OnRPCStopped()
|
static void OnRPCStopped()
|
||||||
{
|
{
|
||||||
rpc_notify_block_change_connection.disconnect();
|
rpc_notify_block_change_connection.disconnect();
|
||||||
RPCNotifyBlockChange(false, nullptr);
|
RPCNotifyBlockChange(nullptr);
|
||||||
g_best_block_cv.notify_all();
|
g_best_block_cv.notify_all();
|
||||||
LogPrint(BCLog::RPC, "RPC stopped.\n");
|
LogPrint(BCLog::RPC, "RPC stopped.\n");
|
||||||
}
|
}
|
||||||
@@ -1702,7 +1702,7 @@ bool AppInitMain(NodeContext& node)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const CBlockIndex* tip = chainstate->m_chain.Tip();
|
const CBlockIndex* tip = chainstate->m_chain.Tip();
|
||||||
RPCNotifyBlockChange(true, tip);
|
RPCNotifyBlockChange(tip);
|
||||||
if (tip && tip->nTime > GetAdjustedTime() + 2 * 60 * 60) {
|
if (tip && tip->nTime > GetAdjustedTime() + 2 * 60 * 60) {
|
||||||
strLoadError = _("The block database contains a block which appears to be from the future. "
|
strLoadError = _("The block database contains a block which appears to be from the future. "
|
||||||
"This may be due to your computer's date and time being set incorrectly. "
|
"This may be due to your computer's date and time being set incorrectly. "
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ static UniValue getbestblockhash(const JSONRPCRequest& request)
|
|||||||
return ::ChainActive().Tip()->GetBlockHash().GetHex();
|
return ::ChainActive().Tip()->GetBlockHash().GetHex();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RPCNotifyBlockChange(bool ibd, const CBlockIndex * pindex)
|
void RPCNotifyBlockChange(const CBlockIndex* pindex)
|
||||||
{
|
{
|
||||||
if(pindex) {
|
if(pindex) {
|
||||||
std::lock_guard<std::mutex> lock(cs_blockchange);
|
std::lock_guard<std::mutex> lock(cs_blockchange);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ static constexpr int NUM_GETBLOCKSTATS_PERCENTILES = 5;
|
|||||||
double GetDifficulty(const CBlockIndex* blockindex);
|
double GetDifficulty(const CBlockIndex* blockindex);
|
||||||
|
|
||||||
/** Callback for when block tip changed. */
|
/** Callback for when block tip changed. */
|
||||||
void RPCNotifyBlockChange(bool ibd, const CBlockIndex *);
|
void RPCNotifyBlockChange(const CBlockIndex*);
|
||||||
|
|
||||||
/** Block description to JSON */
|
/** Block description to JSON */
|
||||||
UniValue blockToJSON(const CBlock& block, const CBlockIndex* tip, const CBlockIndex* blockindex, bool txDetails = false) LOCKS_EXCLUDED(cs_main);
|
UniValue blockToJSON(const CBlock& block, const CBlockIndex* tip, const CBlockIndex* blockindex, bool txDetails = false) LOCKS_EXCLUDED(cs_main);
|
||||||
|
|||||||
Reference in new issue
Block a user