20 #include <ripple/app/ledger/AcceptedLedger.h>
21 #include <ripple/app/ledger/InboundLedgers.h>
22 #include <ripple/app/ledger/Ledger.h>
23 #include <ripple/app/ledger/LedgerMaster.h>
24 #include <ripple/app/ledger/LedgerToJson.h>
25 #include <ripple/app/ledger/OrderBookDB.h>
26 #include <ripple/app/ledger/PendingSaves.h>
27 #include <ripple/app/ledger/TransactionMaster.h>
28 #include <ripple/app/main/Application.h>
29 #include <ripple/app/misc/HashRouter.h>
30 #include <ripple/app/misc/LoadFeeTrack.h>
31 #include <ripple/app/misc/NetworkOPs.h>
32 #include <ripple/basics/Log.h>
33 #include <ripple/basics/StringUtilities.h>
34 #include <ripple/basics/contract.h>
35 #include <ripple/beast/core/LexicalCast.h>
36 #include <ripple/consensus/LedgerTiming.h>
37 #include <ripple/core/Config.h>
38 #include <ripple/core/DatabaseCon.h>
39 #include <ripple/core/JobQueue.h>
40 #include <ripple/core/SociDB.h>
41 #include <ripple/json/to_string.h>
42 #include <ripple/nodestore/Database.h>
43 #include <ripple/protocol/Feature.h>
44 #include <ripple/protocol/HashPrefix.h>
45 #include <ripple/protocol/Indexes.h>
46 #include <ripple/protocol/PublicKey.h>
47 #include <ripple/protocol/SecretKey.h>
48 #include <ripple/protocol/UintTypes.h>
49 #include <ripple/protocol/digest.h>
50 #include <ripple/protocol/jss.h>
51 #include <boost/optional.hpp>
97 return std::make_unique<sles_iter_impl>(*
this);
101 equal(base_type
const& impl)
const override
104 return iter_ == other.iter_;
116 auto const item = *
iter_;
118 return std::make_shared<SLE const>(sit, item.key());
145 return std::make_unique<txs_iter_impl>(*
this);
149 equal(base_type
const& impl)
const override
151 auto const& other =
dynamic_cast<txs_iter_impl const&
>(impl);
152 return iter_ == other.iter_;
164 auto const item = *
iter_;
194 sle->setFieldAmount(
sfBalance, info_.drops);
198 if (!amendments.empty())
201 sle->setFieldV256(
sfAmendments, STVector256{amendments});
206 setImmutable(config);
223 , rules_(config.features)
232 JLOG(j.
warn()) <<
"Don't have transaction root for ledger" <<
info_.
seq;
239 JLOG(j.
warn()) <<
"Don't have state data root for ledger" <<
info_.
seq;
261 prevLedger.stateMap_->family()))
262 , stateMap_(prevLedger.stateMap_->snapShot(true))
263 , fees_(prevLedger.fees_)
264 , rules_(prevLedger.rules_)
312 info_.seq = ledgerSeq;
313 info_.closeTime = closeTime;
341 bool correctCloseTime,
357 return stateMap_->addItem(std::move(item),
false,
false);
366 return std::make_shared<STTx const>(sit);
377 result.
first = std::make_shared<STTx const>(s);
395 boost::optional<uint256>
401 if (last && item->key() >= last)
409 if (k.
key == beast::zero)
417 auto sle = std::make_shared<SLE>(
418 SerialIter{item->data(), item->size()}, item->key());
429 return std::make_unique<sles_iter_impl>(
stateMap_->begin());
435 return std::make_unique<sles_iter_impl>(
stateMap_->end());
442 return std::make_unique<sles_iter_impl>(stateMap_->upper_bound(key));
448 return std::make_unique<txs_iter_impl>(!
open(),
txMap_->begin());
454 return std::make_unique<txs_iter_impl>(!
open(),
txMap_->end());
460 return txMap_->hasItem(key);
466 auto const& item = txMap_->peekItem(key);
472 return {std::move(result.first), std::move(result.second)};
483 if (!stateMap_->peekItem(key,
digest))
485 return digest.as_uint256();
494 LogicError(
"Ledger::rawErase: key not found");
502 auto item = std::make_shared<SHAMapItem const>(sle->key(), std::move(ss));
503 if (!
stateMap_->addGiveItem(std::move(item),
false,
false))
504 LogicError(
"Ledger::rawInsert: key already exists");
512 auto item = std::make_shared<SHAMapItem const>(sle->key(), std::move(ss));
514 if (!
stateMap_->updateGiveItem(std::move(item),
false,
false))
515 LogicError(
"Ledger::rawReplace: key not found");
527 Serializer s(txn->getDataLength() + metaData->getDataLength() + 16);
528 s.
addVL(txn->peekData());
529 s.
addVL(metaData->peekData());
530 auto item = std::make_shared<SHAMapItem const>(key, std::move(s));
531 if (!
txMap().addGiveItem(std::move(item),
true,
true))
595 auto sle = std::make_shared<SLE>(
596 SerialIter{value->data(), value->size()}, value->key());
610 for (
auto const& n : nUnlData)
628 boost::optional<PublicKey>
643 boost::optional<PublicKey>
668 if (!hasToDisable && !hasToReEnable)
675 for (
auto v : oldNUnl)
677 if (hasToReEnable && v.isFieldPresent(
sfPublicKey) &&
693 if (!newNUnl.
empty())
726 if (!missingNodes1.
empty())
728 if (
auto stream = j.
info())
730 stream << missingNodes1.
size() <<
" missing account node(s)";
731 stream <<
"First: " << missingNodes1[0].what();
743 txMap_->walkMap(missingNodes2, 32);
746 if (!missingNodes2.
empty())
748 if (
auto stream = j.
info())
750 stream << missingNodes2.
size() <<
" missing transaction node(s)";
751 stream <<
"First: " << missingNodes2[0].what();
754 return missingNodes1.
empty() && missingNodes2.
empty();
772 JLOG(ledgerJ.
fatal()) <<
"ledger is not sane" << j;
790 if ((prevIndex & 0xff) == 0)
799 sle = std::make_shared<SLE>(k);
804 hashes =
static_cast<decltype(hashes)
>(sle->getFieldV256(
sfHashes));
808 assert(hashes.
size() <= 256);
825 sle = std::make_shared<SLE>(k);
830 hashes =
static_cast<decltype(hashes)
>(sle->getFieldV256(
sfHashes));
833 assert(hashes.
size() <= 256);
834 if (hashes.
size() == 256)
868 auto j = app.
journal(
"Ledger");
873 JLOG(j.debug()) <<
"Save aborted";
878 JLOG(j.trace()) <<
"saveValidatedLedger " << (
current ?
"" :
"fromAcquire ")
880 static boost::format deleteLedger(
881 "DELETE FROM Ledgers WHERE LedgerSeq = %u;");
882 static boost::format deleteTrans1(
883 "DELETE FROM Transactions WHERE LedgerSeq = %u;");
884 static boost::format deleteTrans2(
885 "DELETE FROM AccountTransactions WHERE LedgerSeq = %u;");
886 static boost::format deleteAcctTrans(
887 "DELETE FROM AccountTransactions WHERE TransID = '%s';");
891 JLOG(j.fatal()) <<
"AH is zero: " <<
getJson(*ledger);
899 JLOG(j.fatal()) <<
"saveAcceptedLedger: seq=" << seq
921 aLedger = std::make_shared<AcceptedLedger>(
929 JLOG(j.warn()) <<
"An accepted ledger was missing nodes";
939 *db << boost::str(deleteLedger % seq);
945 soci::transaction tr(*db);
947 *db << boost::str(deleteTrans1 % seq);
948 *db << boost::str(deleteTrans2 % seq);
952 for (
auto const& [_, acceptedLedgerTx] : aLedger->getMap())
965 auto const& accts = acceptedLedgerTx->getAffected();
970 "INSERT INTO AccountTransactions "
971 "(TransID, Account, LedgerSeq, TxnSeq) VALUES ");
979 for (
auto const& account : accts)
999 JLOG(j.trace()) <<
"ActTx: " << sql;
1004 JLOG(j.warn()) <<
"Transaction in ledger " << seq
1005 <<
" affects no accounts";
1012 acceptedLedgerTx->getTxn()->getMetaSQL(
1013 seq, acceptedLedgerTx->getEscMeta()) +
1022 R
"sql(INSERT OR REPLACE INTO Ledgers
1023 (LedgerHash,LedgerSeq,PrevHash,TotalCoins,ClosingTime,PrevClosingTime,
1024 CloseTimeRes,CloseFlags,AccountSetHash,TransSetHash)
1026 (:ledgerHash,:ledgerSeq,:prevHash,:totalCoins,:closingTime,:prevClosingTime,
1027 :closeTimeRes,:closeFlags,:accountSetHash,:transSetHash);)sql");
1031 soci::transaction tr(*db);
1036 auto const closeTime =
1038 auto const parentCloseTime =
1040 auto const closeTimeResolution =
1046 *db << addLedger, soci::use(hash), soci::use(seq),
1047 soci::use(parentHash), soci::use(drops), soci::use(closeTime),
1048 soci::use(parentCloseTime), soci::use(closeTimeResolution),
1049 soci::use(closeFlags), soci::use(accountHash), soci::use(txHash);
1074 JLOG(stream) <<
"Double pend save for " << ledger->
info().
seq;
1089 JLOG(stream) <<
"Pend save with seq in pending saves "
1096 char const*
const jobName{
1097 isCurrent ?
"Ledger::pendSave" :
"Ledger::pendOldSave"};
1100 if (!isSynchronous &&
1103 saveValidatedLedger(app, ledger, isCurrent);
1145 boost::optional<std::string> sLedgerHash, sPrevHash, sAccountHash,
1147 boost::optional<std::uint64_t> totDrops, closingTime, prevClosingTime,
1148 closeResolution, closeFlags, ledgerSeq64;
1152 "LedgerHash, PrevHash, AccountSetHash, TransSetHash, "
1154 "ClosingTime, PrevClosingTime, CloseTimeRes, CloseFlags,"
1155 "LedgerSeq from Ledgers " +
1158 *db << sql, soci::into(sLedgerHash), soci::into(sPrevHash),
1159 soci::into(sAccountHash), soci::into(sTransHash), soci::into(totDrops),
1160 soci::into(closingTime), soci::into(prevClosingTime),
1161 soci::into(closeResolution), soci::into(closeFlags),
1162 soci::into(ledgerSeq64);
1164 if (!db->got_data())
1167 JLOG(stream) <<
"Ledger not found: " << sqlSuffix;
1172 ledgerSeq = rangeCheckedCast<std::uint32_t>(ledgerSeq64.value_or(0));
1174 uint256 prevHash{}, accountHash{}, transHash{};
1178 prevHash.SetHexExact(*sPrevHash);
1180 accountHash.SetHexExact(*sAccountHash);
1182 transHash.SetHexExact(*sTransHash);
1191 info.
drops = totDrops.value_or(0);
1192 info.
closeTime = time_point{duration{closingTime.value_or(0)}};
1193 info.
parentCloseTime = time_point{duration{prevClosingTime.value_or(0)}};
1196 info.
seq = ledgerSeq;
1199 auto ledger = std::make_shared<Ledger>(
1216 Config
const& config,
1235 s <<
"WHERE LedgerSeq = " << ledgerIndex;
1236 std::tie(ledger, std::ignore, std::ignore) =
1250 s <<
"WHERE LedgerHash = '" << ledgerHash <<
"'";
1251 std::tie(ledger, std::ignore, std::ignore) =
1257 assert(!ledger || ledger->
info().
hash == ledgerHash);
1268 "SELECT LedgerHash FROM Ledgers INDEXED BY SeqLedger WHERE LedgerSeq='";
1269 sql.
append(beast::lexicalCastThrow<std::string>(ledgerIndex));
1274 auto db = app.getLedgerDB().checkoutDb();
1276 boost::optional<std::string> lh;
1277 *db << sql, soci::into(lh);
1279 if (!db->got_data() || !lh)
1287 ret.SetHexExact(hash);
1298 auto db = app.getLedgerDB().checkoutDb();
1300 boost::optional<std::string> lhO, phO;
1302 *db <<
"SELECT LedgerHash,PrevHash FROM Ledgers "
1303 "INDEXED BY SeqLedger Where LedgerSeq = :ls;",
1304 soci::into(lhO), soci::into(phO), soci::use(ledgerIndex);
1308 auto stream = app.journal(
"Ledger").trace();
1309 JLOG(stream) <<
"Don't have ledger " << ledgerIndex;
1313 ledgerHash.SetHexExact(*lhO);
1314 parentHash.SetHexExact(*phO);
1325 "SELECT LedgerSeq,LedgerHash,PrevHash FROM Ledgers WHERE LedgerSeq >= ";
1326 sql.
append(beast::lexicalCastThrow<std::string>(minSeq));
1327 sql.
append(
" AND LedgerSeq <= ");
1328 sql.
append(beast::lexicalCastThrow<std::string>(maxSeq));
1331 auto db = app.getLedgerDB().checkoutDb();
1335 boost::optional<std::string> ph;
1336 soci::statement st =
1337 (db->prepare << sql, soci::into(ls), soci::into(lh), soci::into(ph));
1343 ret[rangeCheckedCast<std::uint32_t>(ls)];
1344 hashes.
first.SetHexExact(lh);
1346 hashes.
second.SetHexExact(*ph);
1351 auto stream = app.journal(
"Ledger").warn();
1352 JLOG(stream) <<
"Null prev hash for ledger seq: " << ls;
std::unique_ptr< sles_type::iter_base > slesUpperBound(uint256 const &key) const override
std::tuple< std::shared_ptr< Ledger >, std::uint32_t, uint256 > loadLedgerHelper(std::string const &sqlSuffix, Application &app, bool acquire)
sles_iter_impl(SHAMap::const_iterator iter)
std::unique_ptr< sles_type::iter_base > slesBegin() const override
virtual Family & getNodeFamily()=0
bool addSLE(SLE const &sle)
bool isFlagLedger(LedgerIndex seq)
Returns true if the given ledgerIndex is a flag ledgerIndex.
void rawReplace(std::shared_ptr< SLE > const &sle) override
Unconditionally replace a state item.
@ ledgerMaster
ledger master data for signing
std::shared_ptr< SHAMap > txMap_
std::enable_if_t< std::is_same< T, char >::value||std::is_same< T, unsigned char >::value, Slice > makeSlice(std::array< T, N > const &a)
A pair of SHAMap key and LedgerEntryType.
virtual TaggedCache< uint256, AcceptedLedger > & getAcceptedLedgerCache()=0
bool isVotingLedger() const
Returns true if the ledger directly precedes a flag ledger.
tx_type txRead(key_type const &key) const override
Read a transaction from the tx map.
Keylet const & amendments() noexcept
The index of the amendment table.
SHAMapHash getHash() const
std::shared_ptr< Ledger > loadByIndex(std::uint32_t ledgerIndex, Application &app, bool acquire)
Stream trace() const
Severity stream access functions.
boost::optional< KeyType > publicKeyType(Slice const &slice)
Returns the type of public key.
std::unique_ptr< sles_type::iter_base > slesEnd() const override
bool pending(LedgerIndex seq)
Return true if a ledger is in the progress of being saved.
constexpr value_type drops() const
Returns the number of drops.
const SField sfMetadata(access, STI_METADATA, 257, "Metadata")
const SF_U32 sfSequence(access, STI_UINT32, 4, "Sequence")
sles_type::value_type dereference() const override
const SF_Account sfAccount(access, STI_ACCOUNT, 1, "Account")
Keylet const & skip() noexcept
The index of the "short" skip list.
constexpr std::uint32_t FLAG_LEDGER_INTERVAL
Serializer getSerializer() const
bool exists(Keylet const &k) const override
Determine if a state item exists.
bool equal(base_type const &impl) const override
void push_back(STObject const &object)
std::shared_ptr< SLE > peek(Keylet const &k) const
std::chrono::time_point< Clock, Duration > roundCloseTime(std::chrono::time_point< Clock, Duration > closeTime, std::chrono::duration< Rep, Period > closeResolution)
Calculates the close time for a ledger, given a close time resolution.
void addRaw(LedgerInfo const &info, Serializer &s)
txs_iter_impl & operator=(txs_iter_impl const &)=delete
bool walkLedger(beast::Journal j) const
static std::string const & getMetaSQLInsertReplaceHeader()
bool addJob(JobType type, std::string const &name, JobHandler &&jobHandler)
Adds a job to the JobQueue.
std::string to_string(ListDisposition disposition)
void rawTxInsert(uint256 const &key, std::shared_ptr< Serializer const > const &txn, std::shared_ptr< Serializer const > const &metaData) override
Add a transaction to the tx map.
void setFieldVL(SField const &field, Blob const &)
const SField sfDisabledValidators(access, STI_ARRAY, 17, "DisabledValidators")
bool startWork(LedgerIndex seq)
Start working on a ledger.
txs_iter_impl(bool metadata, SHAMap::const_iterator iter)
void rawErase(std::shared_ptr< SLE > const &sle) override
Delete an existing state item.
void updateNegativeUNL()
update the Negative UNL ledger component.
const SF_U32 sfReserveBase(access, STI_UINT32, 31, "ReserveBase")
virtual void missingNode(std::uint32_t refNum)=0
static void finishLoadByIndexOrHash(std::shared_ptr< Ledger > const &ledger, Config const &config, beast::Journal j)
std::shared_ptr< STTx const > deserializeTx(SHAMapItem const &item)
Deserialize a SHAMapItem containing a single STTx.
std::pair< PublicKey, SecretKey > generateKeyPair(KeyType type, Seed const &seed)
Generate a key pair deterministically.
virtual AccountIDCache const & accountIDCache() const =0
void setImmutable(Config const &config)
constexpr XRPAmount INITIAL_XRP
Configure the native currency.
uint256 getHashByIndex(std::uint32_t ledgerIndex, Application &app)
std::shared_ptr< SLE const > value_type
std::unique_ptr< txs_type::iter_base > txsEnd() const override
static Hasher::result_type digest(void const *data, std::size_t size) noexcept
NetClock::time_point closeTime
uint256 const & key() const
Returns the 'key' (or 'index') of this item.
const SF_U32 sfLastLedgerSequence(access, STI_UINT32, 27, "LastLedgerSequence")
LedgerInfo const & info() const override
Returns information about the ledger.
T time_since_epoch(T... args)
boost::optional< PublicKey > validatorToReEnable() const
get the to be re-enabled validator's master public key if any
virtual void store(NodeObjectType type, Blob &&data, uint256 const &hash, std::uint32_t seq)=0
Store the object.
bool txExists(uint256 const &key) const override
Returns true if a tx exists in the tx map.
bool assertSane(beast::Journal ledgerJ) const
static bool saveValidatedLedger(Application &app, std::shared_ptr< Ledger const > const &ledger, bool current)
std::shared_ptr< Ledger > loadByHash(uint256 const &ledgerHash, Application &app, bool acquire)
LockedSociSession checkoutDb()
void setAccepted(NetClock::time_point closeTime, NetClock::duration closeResolution, bool correctCloseTime, Config const &config)
void failedSave(std::uint32_t seq, uint256 const &hash)
virtual LedgerMaster & getLedgerMaster()=0
Keylet account(AccountID const &id) noexcept
AccountID root.
virtual PendingSaves & pendingSaves()=0
std::pair< std::shared_ptr< STTx const >, std::shared_ptr< STObject const > > deserializeTxPlusMeta(SHAMapItem const &item)
Deserialize a SHAMapItem containing STTx + STObject metadata.
static constexpr FeeUnit32 TRANSACTION_FEE_BASE
std::unique_ptr< base_type > copy() const override
void Rethrow()
Rethrow the exception currently being handled.
virtual Config & config()=0
boost::optional< PublicKey > validatorToDisable() const
get the to be disabled validator's master public key if any
bool isCurrent(ValidationParms const &p, NetClock::time_point now, NetClock::time_point signTime, NetClock::time_point seenTime)
Whether a validation is still current.
SHAMap::const_iterator iter_
SHAMap const & stateMap() const
XRPAmount FEE_OWNER_RESERVE
AccountID calcAccountID(PublicKey const &pk)
A SHAMap is both a radix tree with a fan-out of 16 and a Merkle tree.
SHAMap::const_iterator iter_
bool isFlagLedger() const
Returns true if the ledger is a flag ledger.
bool equal(base_type const &impl) const override
sles_iter_impl & operator=(sles_iter_impl const &)=delete
virtual JobQueue & getJobQueue()=0
XRPAmount FEE_ACCOUNT_RESERVE
void rawInsert(std::shared_ptr< SLE > const &sle) override
Unconditionally insert a state item.
const SF_U32 sfReferenceFeeUnits(access, STI_UINT32, 30, "ReferenceFeeUnits")
@ current
This was a new validation and was added.
void finishWork(LedgerIndex seq)
Finish working on a ledger.
@ transactionID
transaction plus signature to give transaction ID
A generic endpoint for log messages.
virtual DatabaseCon & getLedgerDB()=0
const SF_U32 sfFirstLedgerSequence(access, STI_UINT32, 26, "FirstLedgerSequence")
bool shouldWork(LedgerIndex seq, bool isSynchronous)
Check if a ledger should be dispatched.
bool SetHexExact(const char *psz)
Parse a hex string into a base_uint The string must contain exactly bytes * 2 hex characters and must...
const SF_Blob sfValidatorToReEnable(access, STI_VL, 21, "ValidatorToReEnable")
Json::Value getJson(LedgerFill const &fill)
Return a new Json::Value representing the ledger with given options.
std::shared_ptr< SLE const > read(Keylet const &k) const override
Return the state item associated with a key.
SHAMap const & txMap() const
bool getCloseAgree(LedgerInfo const &info)
Seed generateSeed(std::string const &passPhrase)
Generate a seed deterministically.
const SF_Vec256 sfHashes(access, STI_VECTOR256, 2, "Hashes")
std::unique_ptr< txs_type::iter_base > txsBegin() const override
bool inLedger(uint256 const &hash, std::uint32_t ledger)
const SF_Blob sfPublicKey(access, STI_VL, 1, "PublicKey")
T emplace_back(T... args)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::unordered_set< uint256, beast::uhash<> > features
virtual NodeStore::Database & getNodeStore()=0
virtual beast::Journal journal(std::string const &name)=0
const SF_Amount sfBalance(access, STI_AMOUNT, 2, "Balance")
static uint256 calculateLedgerHash(LedgerInfo const &info)
bool setup(Config const &config)
void emplace_back(Args &&... args)
LedgerIndex seq() const
Returns the sequence number of the base ledger.
const SF_U32 sfReserveIncrement(access, STI_UINT32, 32, "ReserveIncrement")
void LogicError(std::string const &how) noexcept
Called when faulty logic causes a broken invariant.
NetClock::duration closeTimeResolution
sha512_half_hasher::result_type sha512Half(Args const &... args)
Returns the SHA512-Half of a series of objects.
const create_genesis_t create_genesis
std::shared_ptr< SHAMap > stateMap_
bool open() const override
Returns true if this reflects an open ledger.
boost::optional< uint256 > succ(uint256 const &key, boost::optional< uint256 > const &last=boost::none) const override
Return the key of the next state item.
int addVL(Blob const &vector)
hash_set< PublicKey > negativeUNL() const
get Negative UNL validators' master public keys
Rules controlling protocol behavior.
Keylet const & fees() noexcept
The (fixed) index of the object containing the ledger fees.
bool getHashesByIndex(std::uint32_t ledgerIndex, uint256 &ledgerHash, uint256 &parentHash, Application &app)
const SF_Blob sfValidatorToDisable(access, STI_VL, 20, "ValidatorToDisable")
bool check(STLedgerEntry const &) const
Returns true if the SLE matches the type.
int add32(std::uint32_t i)
Information about the notional ledger backing the view.
std::chrono::duration< rep, period > duration
uint256 const & as_uint256() const
const SF_Vec256 sfAmendments(access, STI_VECTOR256, 3, "Amendments")
std::chrono::duration< Rep, Period > getNextLedgerTimeResolution(std::chrono::duration< Rep, Period > previousResolution, bool previousAgree, Seq ledgerSeq)
Calculates the close time resolution for the specified ledger.
const SF_U64 sfBaseFee(access, STI_UINT64, 5, "BaseFee")
constexpr auto ledgerDefaultTimeResolution
Initial resolution of ledger close time.
Keylet const & negativeUNL() noexcept
The (fixed) index of the object containing the ledger negativeUNL.
txs_type::value_type dereference() const override
bool pendSaveValidated(Application &app, std::shared_ptr< Ledger const > const &ledger, bool isSynchronous, bool isCurrent)
Save, or arrange to save, a fully-validated ledger Returns false on error.
Ledger(Ledger const &)=delete
boost::optional< digest_type > digest(key_type const &key) const override
Return the digest associated with the key.
void increment() override
std::chrono::time_point< NetClock > time_point
void setFieldU32(SField const &field, std::uint32_t)
std::unique_ptr< base_type > copy() const override
virtual HashRouter & getHashRouter()=0
void increment() override
bool setFlags(uint256 const &key, int flags)
Set the flags on a hash.
Slice getSlice(std::size_t bytes)
static const std::uint32_t sLCF_NoConsensusTime
virtual DatabaseCon & getTxnDB()=0
void open(soci::session &s, BasicConfig const &config, std::string const &dbName)
Open a soci session.
std::string toBase58(AccountID const &) const
Return ripple::toBase58 for the AccountID.
NetClock::time_point parentCloseTime
const SField sfDisabledValidator(access, STI_OBJECT, 19, "DisabledValidator")
virtual TransactionMaster & getMasterTransaction()=0