Include requesting telemetry metrics from temporary channels (#2653)
* Include requesting telemetry metrics from temporary channels * Read transaction no longer needed (Gui comment)
This commit is contained in:
parent
54761e42bf
commit
6aea75e12b
3 changed files with 3 additions and 4 deletions
|
@ -51,7 +51,7 @@ private: // State management
|
|||
static int constexpr confirmed_duration_factor = 5;
|
||||
std::atomic<nano::election::state_t> state_m = { state_t::idle };
|
||||
|
||||
// Protects state_start, last_vote and last_block
|
||||
// These time points must be protected by this mutex
|
||||
std::mutex timepoints_mutex;
|
||||
std::chrono::steady_clock::time_point state_start = { std::chrono::steady_clock::now () };
|
||||
std::chrono::steady_clock::time_point last_block = { std::chrono::steady_clock::now () };
|
||||
|
|
|
@ -1226,8 +1226,7 @@ void nano::json_handler::block_account ()
|
|||
|
||||
void nano::json_handler::block_count ()
|
||||
{
|
||||
auto transaction (node.store.tx_begin_read ());
|
||||
response_l.put ("count", std::to_string (node.store.block_count (transaction).sum ()));
|
||||
response_l.put ("count", std::to_string (node.ledger.cache.block_count));
|
||||
response_l.put ("unchecked", std::to_string (node.ledger.cache.unchecked_count));
|
||||
response_l.put ("cemented", std::to_string (node.ledger.cache.cemented_count));
|
||||
response_errors ();
|
||||
|
|
|
@ -111,7 +111,7 @@ void nano::telemetry::ongoing_req_all_peers (std::chrono::milliseconds next_requ
|
|||
peers;
|
||||
|
||||
{
|
||||
auto temp_peers = this_l->network.list (std::numeric_limits<size_t>::max (), this_l->network_params.protocol.telemetry_protocol_version_min, false);
|
||||
auto temp_peers = this_l->network.list (std::numeric_limits<size_t>::max (), this_l->network_params.protocol.telemetry_protocol_version_min);
|
||||
peers.insert (temp_peers.begin (), temp_peers.end ());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue