p2p: Add ReadAnchors()

This commit is contained in:
Hennadii Stepanov
2020-09-12 18:01:19 +03:00
parent 567008d2a0
commit c29272a157
2 changed files with 21 additions and 0 deletions

View File

@@ -81,4 +81,12 @@ public:
*/
void DumpAnchors(const fs::path& anchors_db_path, const std::vector<CAddress>& 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<CAddress> ReadAnchors(const fs::path& anchors_db_path);
#endif // BITCOIN_ADDRDB_H