diff --git a/libraries/net/node.cpp b/libraries/net/node.cpp index 18ee890cf3..ca84fbaed3 100644 --- a/libraries/net/node.cpp +++ b/libraries/net/node.cpp @@ -1600,7 +1600,8 @@ namespace graphene { namespace net { namespace detail { } } - void node_impl::on_connection_accepted_message(peer_connection* originating_peer, const connection_accepted_message& connection_accepted_message_received) + void node_impl::on_connection_accepted_message( peer_connection* originating_peer, + const connection_accepted_message& ) { VERIFY_CORRECT_THREAD(); dlog("Received a connection_accepted in response to my \"hello\" from ${peer}", @@ -1608,9 +1609,10 @@ namespace graphene { namespace net { namespace detail { originating_peer->negotiation_status = peer_connection::connection_negotiation_status::peer_connection_accepted; originating_peer->our_state = peer_connection::our_connection_state::connection_accepted; originating_peer->send_message(address_request_message()); - fc::time_point now = fc::time_point::now(); + auto now = fc::time_point::now(); + constexpr int64_t five = 5; if (_is_firewalled == firewalled_state::unknown && - _last_firewall_check_message_sent < (now - fc::minutes(5)) && + _last_firewall_check_message_sent < ( now - fc::minutes(five) ) && originating_peer->core_protocol_version >= 106) { wlog("I don't know if I'm firewalled. Sending a firewall check message to peer ${peer}", @@ -1939,7 +1941,8 @@ namespace graphene { namespace net { namespace detail { std::vector blockchain_synopsis = create_blockchain_synopsis_for_peer( peer ); item_hash_t last_item_seen = blockchain_synopsis.empty() ? item_hash_t() : blockchain_synopsis.back(); - dlog( "sync: sending a request for the next items after ${last_item_seen} to peer ${peer}, (full request is ${blockchain_synopsis})", + dlog( "sync: sending a request for the next items after ${last_item_seen} to peer ${peer}, " + "(full request is ${blockchain_synopsis})", ( "last_item_seen", last_item_seen ) ( "peer", peer->get_remote_endpoint() ) ( "blockchain_synopsis", blockchain_synopsis ) ); @@ -2380,11 +2383,13 @@ namespace graphene { namespace net { namespace detail { { VERIFY_CORRECT_THREAD(); - // expire old inventory so we'll be making decisions our about whether to fetch blocks below based only on recent inventory + // expire old inventory + // so we'll be making our decisions about whether to fetch blocks below based only on recent inventory originating_peer->clear_old_inventory(); dlog( "received inventory of ${count} items from peer ${endpoint}", - ( "count", item_ids_inventory_message_received.item_hashes_available.size() )("endpoint", originating_peer->get_remote_endpoint() ) ); + ("count", item_ids_inventory_message_received.item_hashes_available.size()) + ("endpoint", originating_peer->get_remote_endpoint() ) ); for( const item_hash_t& item_hash : item_ids_inventory_message_received.item_hashes_available ) { item_id advertised_item_id(item_ids_inventory_message_received.item_type, item_hash); diff --git a/libraries/net/node_impl.hxx b/libraries/net/node_impl.hxx index 2605f3d05a..5eaab08b22 100644 --- a/libraries/net/node_impl.hxx +++ b/libraries/net/node_impl.hxx @@ -647,8 +647,7 @@ class node_impl : public peer_connection_delegate, public std::enable_shared_fro void on_hello_message( peer_connection* originating_peer, const hello_message& hello_message_received ); - void on_connection_accepted_message( peer_connection* originating_peer, - const connection_accepted_message& connection_accepted_message_received ); + void on_connection_accepted_message( peer_connection* originating_peer, const connection_accepted_message& ); void on_connection_rejected_message( peer_connection* originating_peer, const connection_rejected_message& connection_rejected_message_received ); diff --git a/sonar-project.properties b/sonar-project.properties index a3054446ca..ce10098fda 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -3,7 +3,7 @@ sonar.organization=bitshares-on-github sonar.projectKey=bitshares_bitshares-core sonar.projectName=BitShares-Core sonar.projectDescription=BitShares Blockchain implementation and command-line interface -sonar.projectVersion=5.2.0 +sonar.projectVersion=5.2.x sonar.host.url=https://sonarcloud.io