aboutsummaryrefslogtreecommitdiff
path: root/src/rpcblockchain.cpp
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2014-06-11 12:23:49 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2014-06-12 13:19:12 +0200
commitf5ae6c98260fdd3c0ca203ce67c6467d9cdaea95 (patch)
tree44b49c1f22f9c9ec6ec0ea9aede291b17112595b /src/rpcblockchain.cpp
parent3f39b9d4551d729c3a2e4decd810ac6887cfaeb3 (diff)
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
Diffstat (limited to 'src/rpcblockchain.cpp')
-rw-r--r--src/rpcblockchain.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 2a21fb462a..0fabc86872 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -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;
}