From c29272a157d09a8125788c1b860e89b63b4cb36c Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sat, 12 Sep 2020 18:01:19 +0300 Subject: p2p: Add ReadAnchors() --- src/addrdb.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/addrdb.h') diff --git a/src/addrdb.h b/src/addrdb.h index 614a0c20e3..4ac0e3e1b5 100644 --- a/src/addrdb.h +++ b/src/addrdb.h @@ -81,4 +81,12 @@ public: */ void DumpAnchors(const fs::path& anchors_db_path, const std::vector& anchors); +/** + * Read the anchor IP address database (anchors.dat) + * + * Deleting anchors.dat is intentional as it avoids renewed peering to anchors after + * an unclean shutdown and thus potential exploitation of the anchor peer policy. + */ +std::vector ReadAnchors(const fs::path& anchors_db_path); + #endif // BITCOIN_ADDRDB_H -- cgit v1.2.3