MCPcopy Create free account
hub / github.com/ElementsProject/elements / ReadAnchors

Function ReadAnchors

src/addrdb.cpp:222–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220}
221
222std::vector<CAddress> ReadAnchors(const fs::path& anchors_db_path)
223{
224 std::vector<CAddress> anchors;
225 try {
226 DeserializeFileDB(anchors_db_path, anchors, CLIENT_VERSION | ADDRV2_FORMAT);
227 LogPrintf("Loaded %i addresses from %s\n", anchors.size(), fs::quoted(fs::PathToString(anchors_db_path.filename())));
228 } catch (const std::exception&) {
229 anchors.clear();
230 }
231
232 fs::remove(anchors_db_path);
233 return anchors;
234}

Callers 1

StartMethod · 0.85

Calls 6

DeserializeFileDBFunction · 0.85
quotedFunction · 0.85
PathToStringFunction · 0.85
filenameMethod · 0.80
sizeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected