diff options
author | Carl Dong <contact@carldong.me> | 2020-12-24 16:18:46 -0500 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2022-04-19 14:34:55 -0400 |
commit | 0d567daf23c9fcb2d95b38913ee45a8b0ba3b027 (patch) | |
tree | 42b303f528ebc5b426bcbc614afce1a9b892a357 /src/rpc | |
parent | 5d670173a32ccdcb25d3a6bf97317f0ac774e0ed (diff) | |
download | bitcoin-0d567daf23c9fcb2d95b38913ee45a8b0ba3b027.tar.xz |
move-mostly: Make pindexBestHeader a ChainMan member
[META] In the next commit, we move the clearing of pindexBestHeader to
ChainstateManager::Unload()
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/blockchain.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index a124e0267c..1c8718ffba 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1207,7 +1207,7 @@ RPCHelpMan getblockchaininfo() UniValue obj(UniValue::VOBJ); obj.pushKV("chain", Params().NetworkIDString()); obj.pushKV("blocks", height); - obj.pushKV("headers", pindexBestHeader ? pindexBestHeader->nHeight : -1); + obj.pushKV("headers", chainman.pindexBestHeader ? chainman.pindexBestHeader->nHeight : -1); obj.pushKV("bestblockhash", tip->GetBlockHash().GetHex()); obj.pushKV("difficulty", (double)GetDifficulty(tip)); obj.pushKV("time", (int64_t)tip->nTime); |