From eccffabcf819598fdcb448a8c3cfaf4ec117131d Mon Sep 17 00:00:00 2001 From: Joris Bontje Date: Thu, 17 Jul 2014 22:48:13 +0200 Subject: [PATCH] return block number of requested block instead of always the latest --- eth/EthStubServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/EthStubServer.cpp b/eth/EthStubServer.cpp index c0ad7ee5d..0d5182eb8 100644 --- a/eth/EthStubServer.cpp +++ b/eth/EthStubServer.cpp @@ -178,7 +178,7 @@ Json::Value EthStubServer::blockJson(const std::string& _hash) auto b = _hash.length() ? bc.block(h256(_hash)) : bc.block(); auto bi = BlockInfo(b); - res["number"] = to_string(bc.details(bc.currentHash()).number); + res["number"] = boost::lexical_cast(bi.number); res["hash"] = boost::lexical_cast(bi.hash); res["parentHash"] = boost::lexical_cast(bi.parentHash); res["sha3Uncles"] = boost::lexical_cast(bi.sha3Uncles);