diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-08-08 17:23:02 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-08-08 17:23:02 +0100 |
commit | e49f6d439d18163f88e82a8536f6e9f6a65a971b (patch) | |
tree | 282c2aaa54a08fdfb7602b26b0631713f5066d1e /src | |
parent | Merge pull request #2247 (diff) | |
download | monero-e49f6d439d18163f88e82a8536f6e9f6a65a971b.tar.xz |
net_node: fix m_in_timedsync initialization
This fixes nodes not being able to connect to nodes which use
recent code. While there, init peer_id too.
Diffstat (limited to 'src')
-rw-r--r-- | src/p2p/net_node.h | 2 | ||||
-rw-r--r-- | src/p2p/net_node.inl | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/p2p/net_node.h b/src/p2p/net_node.h index fb7cebde2..4e1e60d27 100644 --- a/src/p2p/net_node.h +++ b/src/p2p/net_node.h @@ -61,7 +61,7 @@ namespace nodetool template<class base_type> struct p2p_connection_context_t: base_type //t_payload_net_handler::connection_context //public net_utils::connection_context_base { - p2p_connection_context_t(): support_flags(0), m_in_timedsync(false) {} + p2p_connection_context_t(): peer_id(0), support_flags(0), m_in_timedsync(false) {} peerid_type peer_id; uint32_t support_flags; diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index a977f17b7..58a7f3563 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -1678,6 +1678,7 @@ namespace nodetool //associate peer_id with this connection context.peer_id = arg.node_data.peer_id; + context.m_in_timedsync = false; if(arg.node_data.peer_id != m_config.m_peer_id && arg.node_data.my_port) { |