diff --git a/src/main.h b/src/main.h index eb045ae0e..8f6b13749 100644 --- a/src/main.h +++ b/src/main.h @@ -872,8 +872,6 @@ extern CBlockTreeDB *pblocktree; */ int GetSpendHeight(const CCoinsViewCache& inputs); -namespace Consensus { -bool CheckTxInputs(const CTransaction& tx, CValidationState& state, const CCoinsViewCache& inputs, int nSpendHeight, const Consensus::Params& consensusParams); -} +uint64_t CalculateCurrentUsage(); #endif // BITCOIN_MAIN_H diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp index 8d7d85ccd..e57d2f952 100644 --- a/src/rpcblockchain.cpp +++ b/src/rpcblockchain.cpp @@ -889,6 +889,7 @@ UniValue getblockchaininfo(const UniValue& params, bool fHelp) " \"difficulty\": xxxxxx, (numeric) the current difficulty\n" " \"verificationprogress\": xxxx, (numeric) estimate of verification progress [0..1]\n" " \"chainwork\": \"xxxx\" (string) total amount of work in active chain, in hexadecimal\n" + " \"size_on_disk\": xxxxxx, (numeric) the estimated size of the block and undo files on disk\n" " \"commitments\": xxxxxx, (numeric) the current number of note commitments in the commitment tree\n" " \"softforks\": [ (array) status of softforks in progress\n" " {\n" @@ -920,6 +921,7 @@ UniValue getblockchaininfo(const UniValue& params, bool fHelp) obj.push_back(Pair("verificationprogress", Checkpoints::GuessVerificationProgress(Params().Checkpoints(), chainActive.Tip()))); obj.push_back(Pair("chainwork", chainActive.Tip()->nChainWork.GetHex())); obj.push_back(Pair("pruned", fPruneMode)); + obj.push_back(Pair("size_on_disk", CalculateCurrentUsage())); ZCIncrementalMerkleTree tree; pcoinsTip->GetAnchorAt(pcoinsTip->GetBestAnchor(), tree);