File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 10
10
#include < clientversion.h>
11
11
#include < cstdint>
12
12
#include < hash.h>
13
+ #include < logging/timer.h>
13
14
#include < random.h>
14
15
#include < streams.h>
15
16
#include < tinyformat.h>
@@ -156,3 +157,9 @@ bool CAddrDB::Read(CAddrMan& addr, CDataStream& ssPeers)
156
157
}
157
158
return ret;
158
159
}
160
+
161
+ void DumpAnchors (const fs::path& anchors_db_path, const std::vector<CAddress>& anchors)
162
+ {
163
+ LOG_TIME_SECONDS (strprintf (" Flush %d outbound block-relay-only peer addresses to anchors.dat" , anchors.size ()));
164
+ SerializeFileDB (" anchors" , anchors_db_path, anchors);
165
+ }
Original file line number Diff line number Diff line change 11
11
#include < serialize.h>
12
12
13
13
#include < string>
14
- #include < map >
14
+ #include < vector >
15
15
16
- class CSubNet ;
16
+ class CAddress ;
17
17
class CAddrMan ;
18
18
class CDataStream ;
19
19
@@ -73,4 +73,12 @@ class CBanDB
73
73
bool Read (banmap_t & banSet);
74
74
};
75
75
76
+ /* *
77
+ * Dump the anchor IP address database (anchors.dat)
78
+ *
79
+ * Anchors are last known outgoing block-relay-only peers that are
80
+ * tried to re-connect to on startup.
81
+ */
82
+ void DumpAnchors (const fs::path& anchors_db_path, const std::vector<CAddress>& anchors);
83
+
76
84
#endif // BITCOIN_ADDRDB_H
You can’t perform that action at this time.
0 commit comments