rippled
Loading...
Searching...
No Matches
State.h
1#pragma once
2
3#include <xrpl/protocol/Protocol.h>
4#include <xrpl/rdb/DatabaseCon.h>
5#include <xrpl/server/Manifest.h>
6
7#include <boost/filesystem.hpp>
8
9namespace xrpl {
10
17
24void
25initStateDB(soci::session& session, BasicConfig const& config, std::string const& dbName);
26
33getCanDelete(soci::session& session);
34
42setCanDelete(soci::session& session, LedgerIndex canDelete);
43
51getSavedState(soci::session& session);
52
60void
61setSavedState(soci::session& session, SavedState const& state);
62
68void
69setLastRotated(soci::session& session, LedgerIndex seq);
70
71} // 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 initStateDB(soci::session &session, BasicConfig const &config, std::string const &dbName)
initStateDB Opens a session with the State database.
Definition State.cpp:6
void setSavedState(soci::session &session, SavedState const &state)
setSavedState Saves the given state.
Definition State.cpp:82
void setLastRotated(soci::session &session, LedgerIndex seq)
setLastRotated Updates the last rotated ledger sequence.
Definition State.cpp:93
SavedState getSavedState(soci::session &session)
getSavedState Returns the saved state.
Definition State.cpp:71
LedgerIndex setCanDelete(soci::session &session, LedgerIndex canDelete)
setCanDelete Updates the ledger sequence which can be deleted.
Definition State.cpp:64
LedgerIndex getCanDelete(soci::session &session)
getCanDelete Returns the ledger sequence which can be deleted.
Definition State.cpp:55
std::string writableDb
Definition State.h:13
LedgerIndex lastRotated
Definition State.h:15
std::string archiveDb
Definition State.h:14