1#include <xrpl/core/PeerReservationTable.h>
3#include <xrpl/json/json_value.h>
4#include <xrpl/protocol/PublicKey.h>
5#include <xrpl/protocol/jss.h>
6#include <xrpl/protocol/tokens.h>
7#include <xrpl/server/Wallet.h>
57 table_.insert(table.begin(), table.end());
69 auto hint =
table_.find(reservation);
84 auto const deleteme = hint;
88 table_.insert(hint, reservation);
103 auto const it =
table_.find({.nodeId = nodeId});
T back_inserter(T... args)
LockedSociSession checkoutDb()
std::vector< PeerReservation > list() const
std::optional< PeerReservation > insertOrAssign(PeerReservation const &reservation)
std::optional< PeerReservation > erase(PublicKey const &nodeId)
DatabaseCon * connection_
std::unordered_set< PeerReservation, beast::Uhash<>, KeyEqual > table_
bool load(DatabaseCon &connection)
JSON (JavaScript Object Notation).
@ Object
object value (collection of name/value pairs).
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::string toBase58(AccountID const &v)
Convert AccountID to base58 checked string.
void deletePeerReservation(soci::session &session, PublicKey const &nodeId)
deletePeerReservation Deletes an entry from the peer reservation table.
void insertPeerReservation(soci::session &session, PublicKey const &nodeId, std::string const &description)
insertPeerReservation Adds an entry to the peer reservation table.
std::unordered_set< PeerReservation, beast::Uhash<>, KeyEqual > getPeerReservationTable(soci::session &session, beast::Journal j)
getPeerReservationTable Returns the peer reservation table.
auto toJson() const -> json::Value