aboutsummaryrefslogtreecommitdiff
path: root/rpc.cpp
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-08-16 17:05:50 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-08-16 17:05:50 +0000
commit15399da9fe29336f119121340146d78973b601a5 (patch)
tree35a119aa0cd0adea14657b8dbe184b4eef3bdafb /rpc.cpp
parent6da916d4acf0c26be81b4547da0e4160d53aacc8 (diff)
blocks-1,
verify block chain on load, so wouldn't have needed to delete blk*.dat, it would have done a reorg automatically git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@137 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'rpc.cpp')
-rw-r--r--rpc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/rpc.cpp b/rpc.cpp
index d03a7ce767..679951af23 100644
--- a/rpc.cpp
+++ b/rpc.cpp
@@ -120,7 +120,7 @@ Value getblockcount(const Array& params, bool fHelp)
"getblockcount\n"
"Returns the number of blocks in the longest block chain.");
- return nBestHeight + 1;
+ return nBestHeight;
}
@@ -240,7 +240,7 @@ Value getinfo(const Array& params, bool fHelp)
Object obj;
obj.push_back(Pair("version", (int)VERSION));
obj.push_back(Pair("balance", (double)GetBalance() / (double)COIN));
- obj.push_back(Pair("blocks", (int)nBestHeight + 1));
+ obj.push_back(Pair("blocks", (int)nBestHeight));
obj.push_back(Pair("connections", (int)vNodes.size()));
obj.push_back(Pair("proxy", (fUseProxy ? addrProxy.ToStringIPPort() : string())));
obj.push_back(Pair("generate", (bool)fGenerateBitcoins));