diff --git a/rai/core_test/rpc.cpp b/rai/core_test/rpc.cpp index 543f00d8..cab05195 100644 --- a/rai/core_test/rpc.cpp +++ b/rai/core_test/rpc.cpp @@ -1446,6 +1446,7 @@ TEST (rpc, block_count) } ASSERT_EQ (200, response1.status); ASSERT_EQ ("1", response1.json.get ("count")); + ASSERT_EQ ("0", response1.json.get ("unchecked")); } TEST (rpc, frontier_count) diff --git a/rai/node/rpc.cpp b/rai/node/rpc.cpp index 7470bcf7..a7030e02 100644 --- a/rai/node/rpc.cpp +++ b/rai/node/rpc.cpp @@ -452,9 +452,9 @@ void rai::rpc_handler::block_account () void rai::rpc_handler::block_count () { rai::transaction transaction (rpc.node.store.environment, nullptr, false); - auto size (rpc.node.store.block_count (transaction)); boost::property_tree::ptree response_l; - response_l.put ("count", std::to_string (size)); + response_l.put ("count", std::to_string (rpc.node.store.block_count (transaction))); + response_l.put ("unchecked", std::to_string (rpc.node.store.unchecked_count (transaction))); rpc.send_response (response, response_l); }