xrpld
Loading...
Searching...
No Matches
PeerFinder.h
1#pragma once
2
3#include <xrpl/beast/utility/Journal.h>
4#include <xrpl/config/BasicConfig.h>
5#include <xrpl/peerfinder/detail/Store.h>
6#include <xrpl/rdb/DatabaseCon.h>
7
8#include <functional>
9#include <string>
10#include <vector>
11
12namespace xrpl {
13
20void
21initPeerFinderDB(soci::session& session, BasicConfig const& config, beast::Journal j);
22
29void
30updatePeerFinderDB(soci::session& session, int currentSchemaVersion, beast::Journal j);
31
38void
39readPeerFinderDB(soci::session& session, std::function<void(std::string const&, int)> const& func);
40
46void
47savePeerFinderDB(soci::session& session, std::vector<peer_finder::Store::Entry> const& v);
48
49} // namespace xrpl
Holds unparsed configuration information.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
void savePeerFinderDB(soci::session &session, std::vector< peer_finder::Store::Entry > const &v)
savePeerFinderDB Saves a new entry to the peer finder database.
void readPeerFinderDB(soci::session &session, std::function< void(std::string const &, int)> const &func)
readPeerFinderDB Reads all entries from the peer finder database and invokes the given callback for e...
void updatePeerFinderDB(soci::session &session, int currentSchemaVersion, beast::Journal j)
updatePeerFinderDB Updates the peer finder database to a new version.
void initPeerFinderDB(soci::session &session, BasicConfig const &config, beast::Journal j)
initPeerFinderDB Opens a session with the peer finder database.