aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2022-04-28 20:44:13 +0200
committerJon Atack <jon@atack.com>2022-04-28 20:51:33 +0200
commite2b954e87f0c4cd5c8ac6e4d9c6b4d784844b4d2 (patch)
treea84cb1761d7c2d48c74af3eb12b2300a8c9c895a /src
parent86ce844d3b287012f27c7b0bad6d11c9bdd3120e (diff)
downloadbitcoin-e2b954e87f0c4cd5c8ac6e4d9c6b4d784844b4d2.tar.xz
rpc: use GetBlockTime() for getblockchaininfo#time
Diffstat (limited to 'src')
-rw-r--r--src/rpc/blockchain.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index 8265e6d5ba..7bce31c519 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());