MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / Load

Method Load

libi2pd/NetDb.cpp:620–633  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

618 }
619
620 void NetDb::Load ()
621 {
622 // make sure we cleanup netDb from previous attempts
623 m_RouterInfos.clear ();
624 m_Floodfills.Clear ();
625
626 uint64_t ts = i2p::util::GetMillisecondsSinceEpoch();
627 std::vector<std::string> files;
628 m_Storage.Traverse(files);
629 for (const auto& path : files)
630 LoadRouterInfo (path, ts);
631
632 LogPrint (eLogInfo, "NetDb: ", m_RouterInfos.size(), " routers loaded (", m_Floodfills.GetSize (), " floodfils)");
633 }
634
635 void NetDb::SaveUpdated ()
636 {

Callers

nothing calls this directly

Calls 5

LogPrintFunction · 0.85
ClearMethod · 0.80
TraverseMethod · 0.80
GetSizeMethod · 0.45

Tested by

no test coverage detected