Skip to content

Commit 2bec309

Browse files
committed
refactor: Remove unused bool parameter in RPCNotifyBlockChange()
1 parent 1df7701 commit 2bec309

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/init.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,13 +351,13 @@ static void registerSignalHandler(int signal, void(*handler)(int))
351351
static boost::signals2::connection rpc_notify_block_change_connection;
352352
static void OnRPCStarted()
353353
{
354-
rpc_notify_block_change_connection = uiInterface.NotifyBlockTip_connect(&RPCNotifyBlockChange);
354+
rpc_notify_block_change_connection = uiInterface.NotifyBlockTip_connect(std::bind(RPCNotifyBlockChange, std::placeholders::_2));
355355
}
356356

357357
static void OnRPCStopped()
358358
{
359359
rpc_notify_block_change_connection.disconnect();
360-
RPCNotifyBlockChange(false, nullptr);
360+
RPCNotifyBlockChange(nullptr);
361361
g_best_block_cv.notify_all();
362362
LogPrint(BCLog::RPC, "RPC stopped.\n");
363363
}
@@ -1702,7 +1702,7 @@ bool AppInitMain(NodeContext& node)
17021702
}
17031703

17041704
const CBlockIndex* tip = chainstate->m_chain.Tip();
1705-
RPCNotifyBlockChange(true, tip);
1705+
RPCNotifyBlockChange(tip);
17061706
if (tip && tip->nTime > GetAdjustedTime() + 2 * 60 * 60) {
17071707
strLoadError = _("The block database contains a block which appears to be from the future. "
17081708
"This may be due to your computer's date and time being set incorrectly. "

src/rpc/blockchain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ static UniValue getbestblockhash(const JSONRPCRequest& request)
205205
return ::ChainActive().Tip()->GetBlockHash().GetHex();
206206
}
207207

208-
void RPCNotifyBlockChange(bool ibd, const CBlockIndex * pindex)
208+
void RPCNotifyBlockChange(const CBlockIndex* pindex)
209209
{
210210
if(pindex) {
211211
std::lock_guard<std::mutex> lock(cs_blockchange);

src/rpc/blockchain.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static constexpr int NUM_GETBLOCKSTATS_PERCENTILES = 5;
3030
double GetDifficulty(const CBlockIndex* blockindex);
3131

3232
/** Callback for when block tip changed. */
33-
void RPCNotifyBlockChange(bool ibd, const CBlockIndex *);
33+
void RPCNotifyBlockChange(const CBlockIndex*);
3434

3535
/** Block description to JSON */
3636
UniValue blockToJSON(const CBlock& block, const CBlockIndex* tip, const CBlockIndex* blockindex, bool txDetails = false) LOCKS_EXCLUDED(cs_main);

0 commit comments

Comments
 (0)