20 #include <ripple/overlay/PeerReservationTable.h>
22 #include <ripple/app/rdb/RelationalDatabase.h>
23 #include <ripple/app/rdb/Wallet.h>
24 #include <ripple/basics/Log.h>
25 #include <ripple/json/json_value.h>
26 #include <ripple/protocol/PublicKey.h>
27 #include <ripple/protocol/jss.h>
29 #include <boost/optional.hpp>
78 table_.insert(table.begin(), table.end());
90 auto hint =
table_.find(reservation);
105 auto const deleteme = hint;
109 table_.insert(hint, reservation);
124 auto const it =
table_.find({nodeId});
std::optional< PeerReservation > erase(PublicKey const &nodeId)
std::unordered_set< PeerReservation, beast::uhash<>, KeyEqual > table_
T back_inserter(T... args)
std::string toBase58(AccountID const &v)
Convert AccountID to base58 checked string.
DatabaseCon * connection_
auto toJson() const -> Json::Value
JSON (JavaScript Object Notation).
LockedSociSession checkoutDb()
@ objectValue
object value (collection of name/value pairs).
void insertPeerReservation(soci::session &session, PublicKey const &nodeId, std::string const &description)
insertPeerReservation Adds an entry to the peer reservation table.
void deletePeerReservation(soci::session &session, PublicKey const &nodeId)
deletePeerReservation Deletes an entry from the peer reservation table.
std::unordered_set< PeerReservation, beast::uhash<>, KeyEqual > getPeerReservationTable(soci::session &session, beast::Journal j)
getPeerReservationTable Returns the peer reservation table.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::vector< PeerReservation > list() const
std::optional< PeerReservation > insert_or_assign(PeerReservation const &reservation)
bool load(DatabaseCon &connection)