3#include <xrpl/core/PeerReservationTable.h>
4#include <xrpl/rdb/DatabaseCon.h>
5#include <xrpl/server/Manifest.h>
15std::unique_ptr<DatabaseCon>
25std::unique_ptr<DatabaseCon>
39 soci::session& session,
40 std::string
const& dbTable,
54 soci::session& session,
55 std::string
const& dbTable,
56 std::function<
bool(
PublicKey const&)>
const& isTrusted,
83std::pair<PublicKey, SecretKey>
92std::unordered_set<PeerReservation, beast::Uhash<>,
KeyEqual>
103 soci::session& session,
105 std::string
const& description);
136 soci::session& session,
138 boost::optional<std::string> amendmentHash,
139 boost::optional<std::string> amendmentName,
140 boost::optional<AmendmentVote> vote)>
const& callback);
151 soci::session& session,
Remembers manifests with the highest sequence number.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
void saveManifests(soci::session &session, std::string const &dbTable, std::function< bool(PublicKey const &)> const &isTrusted, hash_map< PublicKey, Manifest > const &map, beast::Journal j)
saveManifests Saves all given manifests to the database.
void deletePeerReservation(soci::session &session, PublicKey const &nodeId)
deletePeerReservation Deletes an entry from the peer reservation table.
std::pair< PublicKey, SecretKey > getNodeIdentity(soci::session &session)
Returns a stable public and private key for this node.
void insertPeerReservation(soci::session &session, PublicKey const &nodeId, std::string const &description)
insertPeerReservation Adds an entry to the peer reservation table.
void readAmendments(soci::session &session, std::function< void(boost::optional< std::string > amendmentHash, boost::optional< std::string > amendmentName, boost::optional< AmendmentVote > vote)> const &callback)
readAmendments Reads all amendments from the FeatureVotes table.
std::unordered_set< PeerReservation, beast::Uhash<>, KeyEqual > getPeerReservationTable(soci::session &session, beast::Journal j)
getPeerReservationTable Returns the peer reservation table.
void addValidatorManifest(soci::session &session, std::string const &serialized)
addValidatorManifest Saves the manifest of a validator to the database.
std::unique_ptr< DatabaseCon > makeWalletDB(DatabaseCon::Setup const &setup, beast::Journal j)
makeWalletDB Opens the wallet database and returns it.
bool createFeatureVotes(soci::session &session)
createFeatureVotes Creates the FeatureVote table if it does not exist.
std::unordered_map< Key, Value, Hash, Pred, Allocator > hash_map
void clearNodeIdentity(soci::session &session)
Delete any saved public/private key associated with this node.
void getManifests(soci::session &session, std::string const &dbTable, ManifestCache &cache, beast::Journal j)
getManifests Loads a manifest from the wallet database and stores it in the cache.
std::unique_ptr< DatabaseCon > makeTestWalletDB(DatabaseCon::Setup const &setup, std::string const &dbname, beast::Journal j)
makeTestWalletDB Opens a test wallet database with an arbitrary name.
void voteAmendment(soci::session &session, uint256 const &amendment, std::string const &name, AmendmentVote vote)
voteAmendment Set the veto value for a particular amendment.