mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
add NetworkIDString() to chainparams
- returns the BIP70 network string - use that new function in the core and GUI code and remove unused code and functions
This commit is contained in:
@@ -451,14 +451,11 @@ Value getblockchaininfo(const Array& params, bool fHelp)
|
||||
);
|
||||
|
||||
Object obj;
|
||||
std::string chain = Params().DataDir();
|
||||
if(chain.empty())
|
||||
chain = "main";
|
||||
obj.push_back(Pair("chain", chain));
|
||||
obj.push_back(Pair("blocks", (int)chainActive.Height()));
|
||||
obj.push_back(Pair("bestblockhash", chainActive.Tip()->GetBlockHash().GetHex()));
|
||||
obj.push_back(Pair("difficulty", (double)GetDifficulty()));
|
||||
obj.push_back(Pair("verificationprogress", Checkpoints::GuessVerificationProgress(chainActive.Tip())));
|
||||
obj.push_back(Pair("chainwork", chainActive.Tip()->nChainWork.GetHex()));
|
||||
obj.push_back(Pair("chain", Params().NetworkIDString()));
|
||||
obj.push_back(Pair("blocks", (int)chainActive.Height()));
|
||||
obj.push_back(Pair("bestblockhash", chainActive.Tip()->GetBlockHash().GetHex()));
|
||||
obj.push_back(Pair("difficulty", (double)GetDifficulty()));
|
||||
obj.push_back(Pair("verificationprogress", Checkpoints::GuessVerificationProgress(chainActive.Tip())));
|
||||
obj.push_back(Pair("chainwork", chainActive.Tip()->nChainWork.GetHex()));
|
||||
return obj;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user