aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/net_peerlist_boost_serialization.h
diff options
context:
space:
mode:
authorMiguel Herranz <miguel@ipglider.org>2017-02-09 01:11:58 +0100
committerMiguel Herranz <miguel@ipglider.org>2017-02-10 23:28:54 +0100
commit8277e67f112fcf066b4530616560efec87f0b20e (patch)
tree3e842ce521cf06ab9e3b20fa52be2fbe72ccf4df /src/p2p/net_peerlist_boost_serialization.h
parentMerge pull request #1679 (diff)
downloadmonero-8277e67f112fcf066b4530616560efec87f0b20e.tar.xz
Add anchor connections
Based on https://eprint.iacr.org/2015/263.pdf 4. Anchor connections. Peer list serialisation version bumped to 5.
Diffstat (limited to 'src/p2p/net_peerlist_boost_serialization.h')
-rw-r--r--src/p2p/net_peerlist_boost_serialization.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/p2p/net_peerlist_boost_serialization.h b/src/p2p/net_peerlist_boost_serialization.h
index d9a11728b..9a0d12c2e 100644
--- a/src/p2p/net_peerlist_boost_serialization.h
+++ b/src/p2p/net_peerlist_boost_serialization.h
@@ -49,6 +49,14 @@ namespace boost
a & pl.adr;
a & pl.id;
a & pl.last_seen;
- }
+ }
+
+ template <class Archive, class ver_type>
+ inline void serialize(Archive &a, nodetool::anchor_peerlist_entry& pl, const ver_type ver)
+ {
+ a & pl.adr;
+ a & pl.id;
+ a & pl.first_seen;
+ }
}
}