| 4642 | } |
| 4643 | |
| 4644 | void node_impl::dump_node_status() |
| 4645 | { |
| 4646 | VERIFY_CORRECT_THREAD(); |
| 4647 | ilog( "----------------- PEER STATUS UPDATE --------------------" ); |
| 4648 | ilog( " number of peers: ${active} active, ${handshaking}, ${closing} closing. attempting to maintain ${desired} - ${maximum} peers", |
| 4649 | ( "active", _active_connections.size() )("handshaking", _handshaking_connections.size() )("closing",_closing_connections.size() ) |
| 4650 | ( "desired", _desired_number_of_connections )("maximum", _maximum_number_of_connections ) ); |
| 4651 | for( const peer_connection_ptr& peer : _active_connections ) |
| 4652 | { |
| 4653 | ilog( " active peer ${endpoint} peer_is_in_sync_with_us:${in_sync_with_us} we_are_in_sync_with_peer:${in_sync_with_them}", |
| 4654 | ( "endpoint", peer->get_remote_endpoint() ) |
| 4655 | ( "in_sync_with_us", !peer->peer_needs_sync_items_from_us )("in_sync_with_them", !peer->we_need_sync_items_from_peer ) ); |
| 4656 | if( peer->we_need_sync_items_from_peer ) |
| 4657 | ilog( " above peer has ${count} sync items we might need", ("count", peer->ids_of_items_to_get.size() ) ); |
| 4658 | if (peer->inhibit_fetching_sync_blocks) |
| 4659 | ilog( " we are not fetching sync blocks from the above peer (inhibit_fetching_sync_blocks == true)" ); |
| 4660 | |
| 4661 | } |
| 4662 | for( const peer_connection_ptr& peer : _handshaking_connections ) |
| 4663 | { |
| 4664 | ilog( " handshaking peer ${endpoint} in state ours(${our_state}) theirs(${their_state})", |
| 4665 | ( "endpoint", peer->get_remote_endpoint() )("our_state", peer->our_state )("their_state", peer->their_state ) ); |
| 4666 | } |
| 4667 | |
| 4668 | ilog( "--------- MEMORY USAGE ------------" ); |
| 4669 | ilog( "node._active_sync_requests size: ${size}", ("size", _active_sync_requests.size() ) ); |
| 4670 | ilog( "node._received_sync_items size: ${size}", ("size", _received_sync_items.size() ) ); |
| 4671 | ilog( "node._new_received_sync_items size: ${size}", ("size", _new_received_sync_items.size() ) ); |
| 4672 | ilog( "node._items_to_fetch size: ${size}", ("size", _items_to_fetch.size() ) ); |
| 4673 | ilog( "node._new_inventory size: ${size}", ("size", _new_inventory.size() ) ); |
| 4674 | ilog( "node._message_cache size: ${size}", ("size", _message_cache.size() ) ); |
| 4675 | for( const peer_connection_ptr& peer : _active_connections ) |
| 4676 | { |
| 4677 | ilog( " peer ${endpoint}", ("endpoint", peer->get_remote_endpoint() ) ); |
| 4678 | ilog( " peer.ids_of_items_to_get size: ${size}", ("size", peer->ids_of_items_to_get.size() ) ); |
| 4679 | ilog( " peer.inventory_peer_advertised_to_us size: ${size}", ("size", peer->inventory_peer_advertised_to_us.size() ) ); |
| 4680 | ilog( " peer.inventory_advertised_to_peer size: ${size}", ("size", peer->inventory_advertised_to_peer.size() ) ); |
| 4681 | ilog( " peer.items_requested_from_peer size: ${size}", ("size", peer->items_requested_from_peer.size() ) ); |
| 4682 | ilog( " peer.sync_items_requested_from_peer size: ${size}", ("size", peer->sync_items_requested_from_peer.size() ) ); |
| 4683 | } |
| 4684 | ilog( "--------- END MEMORY USAGE ------------" ); |
| 4685 | } |
| 4686 | |
| 4687 | void node_impl::disconnect_from_peer( peer_connection* peer_to_disconnect, |
| 4688 | const std::string& reason_for_disconnect, |
nothing calls this directly
no test coverage detected