mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
rpc: Remove unnecessary casting of block height
This commit is contained in:
@@ -434,7 +434,7 @@ static RPCHelpMan getmininginfo()
|
||||
const CChain& active_chain = chainman.ActiveChain();
|
||||
|
||||
UniValue obj(UniValue::VOBJ);
|
||||
obj.pushKV("blocks", (int)active_chain.Height());
|
||||
obj.pushKV("blocks", active_chain.Height());
|
||||
if (BlockAssembler::m_last_block_weight) obj.pushKV("currentblockweight", *BlockAssembler::m_last_block_weight);
|
||||
if (BlockAssembler::m_last_block_num_txs) obj.pushKV("currentblocktx", *BlockAssembler::m_last_block_num_txs);
|
||||
obj.pushKV("difficulty", (double)GetDifficulty(active_chain.Tip()));
|
||||
|
||||
Reference in New Issue
Block a user