Skip to content

Commit

Permalink
Do not add to db if !accept_incoming_connections
Browse files Browse the repository at this point in the history
  • Loading branch information
jmjatlanta committed Jul 4, 2019
1 parent b4534bd commit 23bba63
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions libraries/net/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1694,9 +1694,11 @@ namespace graphene { namespace net { namespace detail {
std::vector<graphene::net::address_info> updated_addresses = address_message_received.addresses;
for (address_info& address : updated_addresses)
address.last_seen_time = fc::time_point_sec(fc::time_point::now());
bool new_information_received = merge_address_info_with_potential_peer_database(updated_addresses);
if (new_information_received)
trigger_p2p_network_connect_loop();
if ( _node_configuration.accept_incoming_connections )
{
if ( merge_address_info_with_potential_peer_database(updated_addresses))
trigger_p2p_network_connect_loop();
}

if (_handshaking_connections.find(originating_peer->shared_from_this()) != _handshaking_connections.end())
{
Expand Down

0 comments on commit 23bba63

Please sign in to comment.