@@ -1425,7 +1425,8 @@ RPCHelpMan getblockchaininfo()
1425
1425
{RPCResult::Type::NUM, " headers" , " the current number of headers we have validated" },
1426
1426
{RPCResult::Type::STR, " bestblockhash" , " the hash of the currently best block" },
1427
1427
{RPCResult::Type::NUM, " difficulty" , " the current difficulty" },
1428
- {RPCResult::Type::NUM, " mediantime" , " median time for the current best block" },
1428
+ {RPCResult::Type::NUM_TIME, " time" , " The block time expressed in " + UNIX_EPOCH_TIME},
1429
+ {RPCResult::Type::NUM_TIME, " mediantime" , " The median block time expressed in " + UNIX_EPOCH_TIME},
1429
1430
{RPCResult::Type::NUM, " verificationprogress" , " estimate of verification progress [0..1]" },
1430
1431
{RPCResult::Type::BOOL, " initialblockdownload" , " (debug information) estimate of whether this node is in Initial Block Download mode" },
1431
1432
{RPCResult::Type::STR_HEX, " chainwork" , " total amount of work in active chain, in hexadecimal" },
@@ -1481,6 +1482,7 @@ RPCHelpMan getblockchaininfo()
1481
1482
obj.pushKV (" headers" , pindexBestHeader ? pindexBestHeader->nHeight : -1 );
1482
1483
obj.pushKV (" bestblockhash" , tip->GetBlockHash ().GetHex ());
1483
1484
obj.pushKV (" difficulty" , (double )GetDifficulty (tip));
1485
+ obj.pushKV (" time" , (int64_t )tip->nTime );
1484
1486
obj.pushKV (" mediantime" , (int64_t )tip->GetMedianTimePast ());
1485
1487
obj.pushKV (" verificationprogress" , GuessVerificationProgress (Params ().TxData (), tip));
1486
1488
obj.pushKV (" initialblockdownload" , active_chainstate.IsInitialBlockDownload ());
0 commit comments