MCPcopy Create free account
hub / github.com/bitshares/bitshares-core / dump_node_status

Method dump_node_status

libraries/net/node.cpp:4619–4677  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4617 }
4618
4619 void node_impl::dump_node_status()
4620 {
4621 VERIFY_CORRECT_THREAD();
4622 ilog( "----------------- PEER STATUS UPDATE --------------------" );
4623 ilog( " number of peers: ${active} active, ${handshaking} handshaking, ${closing} closing. "
4624 " attempting to maintain ${desired} - ${maximum} peers",
4625 ( "active", _active_connections.size() )("handshaking", _handshaking_connections.size() )
4626 ( "closing", _closing_connections.size() )
4627 ( "desired", _desired_number_of_connections )("maximum", _maximum_number_of_connections ) );
4628 {
4629 fc::scoped_lock<fc::mutex> lock(_active_connections.get_mutex());
4630 for( const peer_connection_ptr& peer : _active_connections )
4631 {
4632 ilog( " active peer ${endpoint} [${direction}] (${inbound_ep} ${is_firewalled}) "
4633 "peer_is_in_sync_with_us:${in_sync_with_us} we_are_in_sync_with_peer:${in_sync_with_them}",
4634 ( "endpoint", peer->get_remote_endpoint() )
4635 ( "direction", peer->direction )
4636 ( "inbound_ep", peer->get_endpoint_for_connecting() )
4637 ( "is_firewalled", peer->is_firewalled)
4638 ( "in_sync_with_us", !peer->peer_needs_sync_items_from_us )
4639 ( "in_sync_with_them", !peer->we_need_sync_items_from_peer ) );
4640 if( peer->we_need_sync_items_from_peer )
4641 ilog( " above peer has ${count} sync items we might need",
4642 ("count", peer->ids_of_items_to_get.size() ) );
4643 if (peer->inhibit_fetching_sync_blocks)
4644 ilog( " we are not fetching sync blocks from the above peer "
4645 "(inhibit_fetching_sync_blocks == true)" );
4646
4647 }
4648 }
4649 {
4650 fc::scoped_lock<fc::mutex> lock(_handshaking_connections.get_mutex());
4651 for( const peer_connection_ptr& peer : _handshaking_connections )
4652 {
4653 ilog( " handshaking peer ${endpoint} [${direction}] in state ours(${our_state}) theirs(${their_state})",
4654 ( "endpoint", peer->get_remote_endpoint() )
4655 ( "direction", peer->direction )
4656 ( "our_state", peer->our_state )( "their_state", peer->their_state ) );
4657 }
4658 }
4659 ilog( "--------- MEMORY USAGE ------------" );
4660 ilog( "node._active_sync_requests size: ${size}", ("size", _active_sync_requests.size() ) );
4661 ilog( "node._received_sync_items size: ${size}", ("size", _received_sync_items.size() ) );
4662 ilog( "node._new_received_sync_items size: ${size}", ("size", _new_received_sync_items.size() ) );
4663 ilog( "node._items_to_fetch size: ${size}", ("size", _items_to_fetch.size() ) );
4664 ilog( "node._new_inventory size: ${size}", ("size", _new_inventory.size() ) );
4665 ilog( "node._message_cache size: ${size}", ("size", _message_cache.size() ) );
4666 fc::scoped_lock<fc::mutex> lock(_active_connections.get_mutex());
4667 for( const peer_connection_ptr& peer : _active_connections )
4668 {
4669 ilog( " peer ${endpoint}", ("endpoint", peer->get_remote_endpoint() ) );
4670 ilog( " peer.ids_of_items_to_get size: ${size}", ("size", peer->ids_of_items_to_get.size() ) );
4671 ilog( " peer.inventory_peer_advertised_to_us size: ${size}", ("size", peer->inventory_peer_advertised_to_us.size() ) );
4672 ilog( " peer.inventory_advertised_to_peer size: ${size}", ("size", peer->inventory_advertised_to_peer.size() ) );
4673 ilog( " peer.items_requested_from_peer size: ${size}", ("size", peer->items_requested_from_peer.size() ) );
4674 ilog( " peer.sync_items_requested_from_peer size: ${size}", ("size", peer->sync_items_requested_from_peer.size() ) );
4675 }
4676 ilog( "--------- END MEMORY USAGE ------------" );

Callers

nothing calls this directly

Calls 3

get_remote_endpointMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected