mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +01:00
p2p: Add DumpAnchors()
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <clientversion.h>
|
||||
#include <cstdint>
|
||||
#include <hash.h>
|
||||
#include <logging/timer.h>
|
||||
#include <random.h>
|
||||
#include <streams.h>
|
||||
#include <tinyformat.h>
|
||||
@@ -156,3 +157,9 @@ bool CAddrDB::Read(CAddrMan& addr, CDataStream& ssPeers)
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void DumpAnchors(const fs::path& anchors_db_path, const std::vector<CAddress>& anchors)
|
||||
{
|
||||
LOG_TIME_SECONDS(strprintf("Flush %d outbound block-relay-only peer addresses to anchors.dat", anchors.size()));
|
||||
SerializeFileDB("anchors", anchors_db_path, anchors);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user