@@ -3308,6 +3308,8 @@ static RPCHelpMan loadtxoutset()
33083308const std::vector<RPCResult> RPCHelpForChainstate{
33093309 {RPCResult::Type::NUM, " blocks" , " number of blocks in this chainstate" },
33103310 {RPCResult::Type::STR_HEX, " bestblockhash" , " blockhash of the tip" },
3311+ {RPCResult::Type::STR_HEX, " bits" , " nBits: compact representation of the block difficulty target" },
3312+ {RPCResult::Type::STR_HEX, " target" , " The difficulty target" },
33113313 {RPCResult::Type::NUM, " difficulty" , " difficulty of the tip" },
33123314 {RPCResult::Type::NUM, " verificationprogress" , " progress towards the network tip" },
33133315 {RPCResult::Type::STR_HEX, " snapshot_blockhash" , /* optional=*/ true , " the base block of the snapshot this chainstate is based on, if any" },
@@ -3350,6 +3352,8 @@ return RPCHelpMan{
33503352
33513353 data.pushKV (" blocks" , (int )chain.Height ());
33523354 data.pushKV (" bestblockhash" , tip->GetBlockHash ().GetHex ());
3355+ data.pushKV (" bits" , strprintf (" %08x" , tip->nBits ));
3356+ data.pushKV (" target" , GetTarget (*tip, chainman.GetConsensus ().powLimit ).GetHex ());
33533357 data.pushKV (" difficulty" , GetDifficulty (*tip));
33543358 data.pushKV (" verificationprogress" , chainman.GuessVerificationProgress (tip));
33553359 data.pushKV (" coins_db_cache_bytes" , cs.m_coinsdb_cache_size_bytes );
0 commit comments