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_boost_serialization.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 'src/p2p/net_peerlist_boost_serialization.h')
-rw-r--r-- | src/p2p/net_peerlist_boost_serialization.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/p2p/net_peerlist_boost_serialization.h b/src/p2p/net_peerlist_boost_serialization.h index d2e9efa3d..4264dd355 100644 --- a/src/p2p/net_peerlist_boost_serialization.h +++ b/src/p2p/net_peerlist_boost_serialization.h @@ -41,6 +41,8 @@ #include "common/pruning.h" #endif +BOOST_CLASS_VERSION(nodetool::peerlist_entry, 2) + namespace boost { namespace serialization @@ -152,6 +154,13 @@ namespace boost pl.pruning_seed = tools::make_pruning_seed(1+pl.adr.as<epee::net_utils::ipv4_network_address>().ip() % (1<<CRYPTONOTE_PRUNING_LOG_STRIPES), CRYPTONOTE_PRUNING_LOG_STRIPES); } #endif + if (ver < 2) + { + if (!typename Archive::is_saving()) + pl.rpc_port = 0; + return; + } + a & pl.rpc_port; } template <class Archive, class ver_type> |