diff options
author | xiphon <xiphon@protonmail.com> | 2019-02-24 08:47:49 +0000 |
---|---|---|
committer | xiphon <xiphon@protonmail.com> | 2019-02-25 02:40:23 +0300 |
commit | 551104fbf1d2d82cad57d5ea240d1b7be2810ea1 (patch) | |
tree | f6ee718c60963bab82468c577f1705eef54b7768 /src/p2p/net_peerlist.h | |
parent | Merge pull request #4988 (diff) | |
download | monero-551104fbf1d2d82cad57d5ea240d1b7be2810ea1.tar.xz |
daemon: add --public-node mode, RPC port propagation over P2P
Diffstat (limited to '')
-rw-r--r-- | src/p2p/net_peerlist.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/p2p/net_peerlist.h b/src/p2p/net_peerlist.h index 46726d7d8..74831fdfe 100644 --- a/src/p2p/net_peerlist.h +++ b/src/p2p/net_peerlist.h @@ -111,7 +111,7 @@ namespace nodetool bool append_with_peer_white(const peerlist_entry& pr); bool append_with_peer_gray(const peerlist_entry& pr); bool append_with_peer_anchor(const anchor_peerlist_entry& ple); - bool set_peer_just_seen(peerid_type peer, const epee::net_utils::network_address& addr, uint32_t pruning_seed); + bool set_peer_just_seen(peerid_type peer, const epee::net_utils::network_address& addr, uint32_t pruning_seed, uint16_t rpc_port); bool set_peer_unreachable(const peerlist_entry& pr); bool is_host_allowed(const epee::net_utils::network_address &address); bool get_random_gray_peer(peerlist_entry& pe); @@ -295,7 +295,7 @@ namespace nodetool } //-------------------------------------------------------------------------------------------------- inline - bool peerlist_manager::set_peer_just_seen(peerid_type peer, const epee::net_utils::network_address& addr, uint32_t pruning_seed) + bool peerlist_manager::set_peer_just_seen(peerid_type peer, const epee::net_utils::network_address& addr, uint32_t pruning_seed, uint16_t rpc_port) { TRY_ENTRY(); CRITICAL_REGION_LOCAL(m_peerlist_lock); @@ -305,6 +305,7 @@ namespace nodetool ple.id = peer; ple.last_seen = time(NULL); ple.pruning_seed = pruning_seed; + ple.rpc_port = rpc_port; return append_with_peer_white(ple); CATCH_ENTRY_L0("peerlist_manager::set_peer_just_seen()", false); } |