From e2b954e87f0c4cd5c8ac6e4d9c6b4d784844b4d2 Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Thu, 28 Apr 2022 20:44:13 +0200 Subject: [PATCH] rpc: use GetBlockTime() for getblockchaininfo#time --- src/rpc/blockchain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 8265e6d5ba9..7bce31c5194 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1208,7 +1208,7 @@ RPCHelpMan getblockchaininfo() obj.pushKV("headers", chainman.m_best_header ? chainman.m_best_header->nHeight : -1); obj.pushKV("bestblockhash", tip.GetBlockHash().GetHex()); obj.pushKV("difficulty", GetDifficulty(&tip)); - obj.pushKV("time", int64_t{tip.nTime}); + obj.pushKV("time", tip.GetBlockTime()); obj.pushKV("mediantime", tip.GetMedianTimePast()); obj.pushKV("verificationprogress", GuessVerificationProgress(Params().TxData(), &tip)); obj.pushKV("initialblockdownload", active_chainstate.IsInitialBlockDownload());