rippled
Loading...
Searching...
No Matches
SQLiteDatabase.cpp
1#include <xrpld/app/ledger/LedgerMaster.h>
2#include <xrpld/app/ledger/TransactionMaster.h>
3#include <xrpld/app/misc/detail/AccountTxPaging.h>
4#include <xrpld/app/rdb/backend/SQLiteDatabase.h>
5#include <xrpld/app/rdb/backend/detail/Node.h>
6
7#include <xrpl/basics/StringUtilities.h>
8#include <xrpl/rdb/DatabaseCon.h>
9#include <xrpl/rdb/SociDB.h>
10
11namespace xrpl {
12
13bool
15 Config const& config,
16 DatabaseCon::Setup const& setup,
17 DatabaseCon::CheckpointerSetup const& checkpointerSetup)
18{
19 auto [lgr, tx, res] = detail::makeLedgerDBs(config, setup, checkpointerSetup, j_);
20 txdb_ = std::move(tx);
21 ledgerDb_ = std::move(lgr);
22 return res;
23}
24
27{
28 /* if databases exists, use it */
29 if (existsLedger())
30 {
31 auto db = checkoutLedger();
33 }
34
35 /* else return empty value */
36 return {};
37}
38
41{
42 if (!useTxTables_)
43 return {};
44
46 {
47 auto db = checkoutTransaction();
49 }
50
51 return {};
52}
53
56{
57 if (!useTxTables_)
58 return {};
59
61 {
62 auto db = checkoutTransaction();
64 }
65
66 return {};
67}
68
71{
72 if (existsLedger())
73 {
74 auto db = checkoutLedger();
76 }
77
78 return {};
79}
80
81void
83{
84 if (!useTxTables_)
85 return;
86
88 {
89 auto db = checkoutTransaction();
91 return;
92 }
93}
94
95void
97{
98 if (existsLedger())
99 {
100 auto db = checkoutLedger();
102 return;
103 }
104}
105
106void
108{
109 if (!useTxTables_)
110 return;
111
112 if (existsTransaction())
113 {
114 auto db = checkoutTransaction();
116 return;
117 }
118}
119
120void
122{
123 if (!useTxTables_)
124 return;
125
126 if (existsTransaction())
127 {
128 auto db = checkoutTransaction();
130 return;
131 }
132}
133
136{
137 if (!useTxTables_)
138 return 0;
139
140 if (existsTransaction())
141 {
142 auto db = checkoutTransaction();
144 }
145
146 return 0;
147}
148
151{
152 if (!useTxTables_)
153 return 0;
154
155 if (existsTransaction())
156 {
157 auto db = checkoutTransaction();
159 }
160
161 return 0;
162}
163
166{
167 if (existsLedger())
168 {
169 auto db = checkoutLedger();
171 }
172
173 return {0, 0, 0};
174}
175
176bool
178{
179 if (existsLedger())
180 {
182 return false;
183 }
184
185 return true;
186}
187
190{
191 if (existsLedger())
192 {
193 auto db = checkoutLedger();
194 auto const res = detail::getLedgerInfoByIndex(*db, ledgerSeq, j_);
195
196 if (res.has_value())
197 return res;
198 }
199
200 return {};
201}
202
205{
206 if (existsLedger())
207 {
208 auto db = checkoutLedger();
209 auto const res = detail::getNewestLedgerInfo(*db, j_);
210
211 if (res.has_value())
212 return res;
213 }
214
215 return {};
216}
217
220{
221 if (existsLedger())
222 {
223 auto db = checkoutLedger();
224 auto const res = detail::getLimitedOldestLedgerInfo(*db, ledgerFirstIndex, j_);
225
226 if (res.has_value())
227 return res;
228 }
229
230 return {};
231}
232
235{
236 if (existsLedger())
237 {
238 auto db = checkoutLedger();
239 auto const res = detail::getLimitedNewestLedgerInfo(*db, ledgerFirstIndex, j_);
240
241 if (res.has_value())
242 return res;
243 }
244
245 return {};
246}
247
250{
251 if (existsLedger())
252 {
253 auto db = checkoutLedger();
254 auto const res = detail::getLedgerInfoByHash(*db, ledgerHash, j_);
255
256 if (res.has_value())
257 return res;
258 }
259
260 return {};
261}
262
265{
266 if (existsLedger())
267 {
268 auto db = checkoutLedger();
269 auto const res = detail::getHashByIndex(*db, ledgerIndex);
270
271 if (res.isNonZero())
272 return res;
273 }
274
275 return uint256();
276}
277
280{
281 if (existsLedger())
282 {
283 auto db = checkoutLedger();
284 auto const res = detail::getHashesByIndex(*db, ledgerIndex, j_);
285
286 if (res.has_value())
287 return res;
288 }
289
290 return {};
291}
292
295{
296 if (existsLedger())
297 {
298 auto db = checkoutLedger();
299 auto const res = detail::getHashesByIndex(*db, minSeq, maxSeq, j_);
300
301 if (!res.empty())
302 return res;
303 }
304
305 return {};
306}
307
310{
311 if (!useTxTables_)
312 return {};
313
314 if (existsTransaction())
315 {
316 auto db = checkoutTransaction();
317 auto const res = detail::getTxHistory(*db, registry_.app(), startIndex, 20).first;
318
319 if (!res.empty())
320 return res;
321 }
322
323 return {};
324}
325
328{
329 if (!useTxTables_)
330 return {};
331
333
334 if (existsTransaction())
335 {
336 auto db = checkoutTransaction();
337 return detail::getOldestAccountTxs(*db, registry_.app(), ledgerMaster, options, j_).first;
338 }
339
340 return {};
341}
342
345{
346 if (!useTxTables_)
347 return {};
348
350
351 if (existsTransaction())
352 {
353 auto db = checkoutTransaction();
354 return detail::getNewestAccountTxs(*db, registry_.app(), ledgerMaster, options, j_).first;
355 }
356
357 return {};
358}
359
362{
363 if (!useTxTables_)
364 return {};
365
366 if (existsTransaction())
367 {
368 auto db = checkoutTransaction();
369 return detail::getOldestAccountTxsB(*db, registry_.app(), options, j_).first;
370 }
371
372 return {};
373}
374
377{
378 if (!useTxTables_)
379 return {};
380
381 if (existsTransaction())
382 {
383 auto db = checkoutTransaction();
384 return detail::getNewestAccountTxsB(*db, registry_.app(), options, j_).first;
385 }
386
387 return {};
388}
389
392{
393 if (!useTxTables_)
394 return {};
395
396 static std::uint32_t const page_length(200);
397 auto onUnsavedLedger = std::bind(saveLedgerAsync, std::ref(registry_.app()), std::placeholders::_1);
398 AccountTxs ret;
399 auto onTransaction = [&ret, &app = registry_.app()](
400 std::uint32_t ledger_index, std::string const& status, Blob&& rawTxn, Blob&& rawMeta) {
401 convertBlobsToTxResult(ret, ledger_index, status, rawTxn, rawMeta, app);
402 };
403
404 if (existsTransaction())
405 {
406 auto db = checkoutTransaction();
407 auto newmarker = detail::oldestAccountTxPage(*db, onUnsavedLedger, onTransaction, options, page_length).first;
408 return {ret, newmarker};
409 }
410
411 return {};
412}
413
416{
417 if (!useTxTables_)
418 return {};
419
420 static std::uint32_t const page_length(200);
421 auto onUnsavedLedger = std::bind(saveLedgerAsync, std::ref(registry_.app()), std::placeholders::_1);
422 AccountTxs ret;
423 auto onTransaction = [&ret, &app = registry_.app()](
424 std::uint32_t ledger_index, std::string const& status, Blob&& rawTxn, Blob&& rawMeta) {
425 convertBlobsToTxResult(ret, ledger_index, status, rawTxn, rawMeta, app);
426 };
427
428 if (existsTransaction())
429 {
430 auto db = checkoutTransaction();
431 auto newmarker = detail::newestAccountTxPage(*db, onUnsavedLedger, onTransaction, options, page_length).first;
432 return {ret, newmarker};
433 }
434
435 return {};
436}
437
440{
441 if (!useTxTables_)
442 return {};
443
444 static std::uint32_t const page_length(500);
445 auto onUnsavedLedger = std::bind(saveLedgerAsync, std::ref(registry_.app()), std::placeholders::_1);
446 MetaTxsList ret;
447 auto onTransaction = [&ret](std::uint32_t ledgerIndex, std::string const& status, Blob&& rawTxn, Blob&& rawMeta) {
448 ret.emplace_back(std::move(rawTxn), std::move(rawMeta), ledgerIndex);
449 };
450
451 if (existsTransaction())
452 {
453 auto db = checkoutTransaction();
454 auto newmarker = detail::oldestAccountTxPage(*db, onUnsavedLedger, onTransaction, options, page_length).first;
455 return {ret, newmarker};
456 }
457
458 return {};
459}
460
463{
464 if (!useTxTables_)
465 return {};
466
467 static std::uint32_t const page_length(500);
468 auto onUnsavedLedger = std::bind(saveLedgerAsync, std::ref(registry_.app()), std::placeholders::_1);
469 MetaTxsList ret;
470 auto onTransaction = [&ret](std::uint32_t ledgerIndex, std::string const& status, Blob&& rawTxn, Blob&& rawMeta) {
471 ret.emplace_back(std::move(rawTxn), std::move(rawMeta), ledgerIndex);
472 };
473
474 if (existsTransaction())
475 {
476 auto db = checkoutTransaction();
477 auto newmarker = detail::newestAccountTxPage(*db, onUnsavedLedger, onTransaction, options, page_length).first;
478 return {ret, newmarker};
479 }
480
481 return {};
482}
483
486 uint256 const& id,
488 error_code_i& ec)
489{
490 if (!useTxTables_)
491 return TxSearched::unknown;
492
493 if (existsTransaction())
494 {
495 auto db = checkoutTransaction();
496 return detail::getTransaction(*db, registry_.app(), id, range, ec);
497 }
498
499 return TxSearched::unknown;
500}
501
503 : registry_(rhs.registry_), useTxTables_(rhs.useTxTables_), j_(rhs.j_)
504{
505 std::exchange(ledgerDb_, std::move(rhs.ledgerDb_));
506 std::exchange(txdb_, std::move(rhs.txdb_));
507}
508
509bool
511{
512 if (existsLedger())
513 {
514 auto db = checkoutLedger();
515 return detail::dbHasSpace(*db, config, j_);
516 }
517
518 return true;
519}
520
521bool
523{
524 if (!useTxTables_)
525 return true;
526
527 if (existsTransaction())
528 {
529 auto db = checkoutTransaction();
530 return detail::dbHasSpace(*db, config, j_);
531 }
532
533 return true;
534}
535
538{
539 if (existsLedger())
540 {
541 return xrpl::getKBUsedAll(ledgerDb_->getSession());
542 }
543
544 return 0;
545}
546
549{
550 if (existsLedger())
551 {
552 return xrpl::getKBUsedDB(ledgerDb_->getSession());
553 }
554
555 return 0;
556}
557
560{
561 if (!useTxTables_)
562 return 0;
563
564 if (existsTransaction())
565 {
566 return xrpl::getKBUsedDB(txdb_->getSession());
567 }
568
569 return 0;
570}
571
572void
577
578void
583
585 : registry_(registry), useTxTables_(config.useTxTables()), j_(registry.journal("SQLiteDatabase"))
586{
587 DatabaseCon::Setup const setup = setup_DatabaseCon(config, j_);
588 if (!makeLedgerDBs(config, setup, DatabaseCon::CheckpointerSetup{&jobQueue, &registry_.logs()}))
589 {
590 std::string_view constexpr error = "Failed to create ledger databases";
591
592 JLOG(j_.fatal()) << error;
593 Throw<std::runtime_error>(error.data());
594 }
595}
596
598setup_RelationalDatabase(ServiceRegistry& registry, Config const& config, JobQueue& jobQueue)
599{
600 return {registry, config, jobQueue};
601}
602
603} // namespace xrpl
T bind(T... args)
Stream fatal() const
Definition Journal.h:324
A pool of threads to perform work.
Definition JobQueue.h:37
bool existsLedger()
existsLedger Checks if the node store ledger database exists.
uint256 getHashByIndex(LedgerIndex ledgerIndex) override
getHashByIndex Returns the hash of the ledger with the given sequence.
MetaTxsList getNewestAccountTxsB(AccountTxOptions const &options) override
getNewestAccountTxsB Returns the newest transactions in binary form for the account that matches the ...
bool ledgerDbHasSpace(Config const &config)
ledgerDbHasSpace Checks if the ledger database has available space.
auto checkoutTransaction()
checkoutTransaction Checks out and returns the node store transaction database.
void deleteTransactionByLedgerSeq(LedgerIndex ledgerSeq) override
deleteTransactionByLedgerSeq Deletes transactions from the ledger with the given sequence.
std::optional< LedgerHeader > getLimitedOldestLedgerInfo(LedgerIndex ledgerFirstIndex) override
getLimitedOldestLedgerInfo Returns the info of the oldest ledger whose sequence number is greater tha...
SQLiteDatabase(ServiceRegistry &registry, Config const &config, JobQueue &jobQueue)
bool makeLedgerDBs(Config const &config, DatabaseCon::Setup const &setup, DatabaseCon::CheckpointerSetup const &checkpointerSetup)
makeLedgerDBs Opens ledger and transaction databases for the node store, and stores their descriptors...
std::vector< std::shared_ptr< Transaction > > getTxHistory(LedgerIndex startIndex) override
getTxHistory Returns the 20 most recent transactions starting from the given number.
AccountTxs getOldestAccountTxs(AccountTxOptions const &options) override
getOldestAccountTxs Returns the oldest transactions for the account that matches the given criteria s...
void closeTransactionDB() override
Closes the transaction database.
auto checkoutLedger()
checkoutTransaction Checks out and returns node store ledger database.
void closeLedgerDB() override
Closes the ledger database.
std::optional< LedgerHeader > getLimitedNewestLedgerInfo(LedgerIndex ledgerFirstIndex) override
getLimitedNewestLedgerInfo Returns the info of the newest ledger whose sequence number is greater tha...
CountMinMax getLedgerCountMinMax() override
getLedgerCountMinMax Returns the minimum ledger sequence, maximum ledger sequence and total number of...
std::unique_ptr< DatabaseCon > txdb_
MetaTxsList getOldestAccountTxsB(AccountTxOptions const &options) override
getOldestAccountTxsB Returns the oldest transactions in binary form for the account that matches the ...
bool saveValidatedLedger(std::shared_ptr< Ledger const > const &ledger, bool current) override
saveValidatedLedger Saves a ledger into the database.
std::optional< LedgerIndex > getMaxLedgerSeq() override
getMaxLedgerSeq Returns the maximum ledger sequence in the Ledgers table.
std::optional< LedgerIndex > getMinLedgerSeq() override
getMinLedgerSeq Returns the minimum ledger sequence in the Ledgers table.
std::uint32_t getKBUsedTransaction() override
getKBUsedTransaction Returns the amount of space used by the transaction database.
std::uint32_t getKBUsedLedger() override
getKBUsedLedger Returns the amount of space space used by the ledger database.
AccountTxs getNewestAccountTxs(AccountTxOptions const &options) override
getNewestAccountTxs Returns the newest transactions for the account that matches the given criteria s...
void deleteAccountTransactionsBeforeLedgerSeq(LedgerIndex ledgerSeq) override
deleteAccountTransactionsBeforeLedgerSeq Deletes all account transactions with a sequence number less...
std::optional< LedgerIndex > getAccountTransactionsMinLedgerSeq() override
getAccountTransactionsMinLedgerSeq Returns the minimum ledger sequence stored in the AccountTransacti...
std::size_t getAccountTransactionCount() override
getAccountTransactionCount Returns the number of account transactions.
bool existsTransaction()
existsTransaction Checks if the node store transaction database exists.
std::pair< AccountTxs, std::optional< AccountTxMarker > > newestAccountTxPage(AccountTxPageOptions const &options) override
newestAccountTxPage Returns the newest transactions for the account that matches the given criteria s...
std::pair< MetaTxsList, std::optional< AccountTxMarker > > oldestAccountTxPageB(AccountTxPageOptions const &options) override
oldestAccountTxPageB Returns the oldest transactions in binary form for the account that matches the ...
void deleteTransactionsBeforeLedgerSeq(LedgerIndex ledgerSeq) override
deleteTransactionsBeforeLedgerSeq Deletes all transactions with a sequence number less than or equal ...
std::unique_ptr< DatabaseCon > ledgerDb_
std::optional< LedgerHeader > getLedgerInfoByHash(uint256 const &ledgerHash) override
getLedgerInfoByHash Returns the info of the ledger with given hash.
std::optional< LedgerHeader > getNewestLedgerInfo() override
getNewestLedgerInfo Returns the info of the newest saved ledger.
void deleteBeforeLedgerSeq(LedgerIndex ledgerSeq) override
deleteBeforeLedgerSeq Deletes all ledgers with a sequence number less than or equal to the given ledg...
std::uint32_t getKBUsedAll() override
getKBUsedAll Returns the amount of space used by all databases.
std::size_t getTransactionCount() override
getTransactionCount Returns the number of transactions.
ServiceRegistry & registry_
std::optional< LedgerHashPair > getHashesByIndex(LedgerIndex ledgerIndex) override
getHashesByIndex Returns the hashes of the ledger and its parent as specified by the ledgerIndex.
std::variant< AccountTx, TxSearched > getTransaction(uint256 const &id, std::optional< ClosedInterval< std::uint32_t > > const &range, error_code_i &ec) override
getTransaction Returns the transaction with the given hash.
std::optional< LedgerIndex > getTransactionsMinLedgerSeq() override
getTransactionsMinLedgerSeq Returns the minimum ledger sequence stored in the Transactions table.
std::pair< AccountTxs, std::optional< AccountTxMarker > > oldestAccountTxPage(AccountTxPageOptions const &options) override
oldestAccountTxPage Returns the oldest transactions for the account that matches the given criteria s...
bool transactionDbHasSpace(Config const &config)
transactionDbHasSpace Checks if the transaction database has available space.
std::pair< MetaTxsList, std::optional< AccountTxMarker > > newestAccountTxPageB(AccountTxPageOptions const &options) override
newestAccountTxPageB Returns the newest transactions in binary form for the account that matches the ...
std::optional< LedgerHeader > getLedgerInfoByIndex(LedgerIndex ledgerSeq) override
getLedgerInfoByIndex Returns a ledger by its sequence.
Service registry for dependency injection.
virtual Logs & logs()=0
virtual LedgerMaster & getLedgerMaster()=0
virtual Application & app()=0
T emplace_back(T... args)
T exchange(T... args)
std::optional< LedgerHeader > getLedgerInfoByHash(soci::session &session, uint256 const &ledgerHash, beast::Journal j)
getLedgerInfoByHash Returns info of ledger with given hash.
Definition Node.cpp:449
bool saveValidatedLedger(DatabaseCon &ldgDB, std::unique_ptr< DatabaseCon > const &txnDB, Application &app, std::shared_ptr< Ledger const > const &ledger, bool current)
saveValidatedLedger Saves ledger into database.
Definition Node.cpp:158
void deleteBeforeLedgerSeq(soci::session &session, TableType type, LedgerIndex ledgerSeq)
deleteBeforeLedgerSeq Deletes all entries in given table for the ledgers with given sequence and all ...
Definition Node.cpp:126
std::optional< LedgerIndex > getMinLedgerSeq(soci::session &session, TableType type)
getMinLedgerSeq Returns minimum ledger sequence in given table.
Definition Node.cpp:100
std::optional< LedgerIndex > getMaxLedgerSeq(soci::session &session, TableType type)
getMaxLedgerSeq Returns maximum ledger sequence in given table.
Definition Node.cpp:110
std::pair< RelationalDatabase::AccountTxs, int > getNewestAccountTxs(soci::session &session, Application &app, LedgerMaster &ledgerMaster, RelationalDatabase::AccountTxOptions const &options, beast::Journal j)
getNewestAccountTxs Returns newest transactions for given account which match given criteria starting...
Definition Node.cpp:775
std::pair< std::vector< std::shared_ptr< Transaction > >, int > getTxHistory(soci::session &session, Application &app, LedgerIndex startIndex, int quantity)
getTxHistory Returns given number of most recent transactions starting from given number of entry.
Definition Node.cpp:550
std::pair< std::vector< RelationalDatabase::txnMetaLedgerType >, int > getOldestAccountTxsB(soci::session &session, Application &app, RelationalDatabase::AccountTxOptions const &options, beast::Journal j)
getOldestAccountTxsB Returns oldest transactions in binary form for given account which match given c...
Definition Node.cpp:857
std::optional< LedgerHeader > getNewestLedgerInfo(soci::session &session, beast::Journal j)
getNewestLedgerInfo Returns info of newest saved ledger.
Definition Node.cpp:425
std::optional< LedgerHeader > getLimitedOldestLedgerInfo(soci::session &session, LedgerIndex ledgerFirstIndex, beast::Journal j)
getLimitedOldestLedgerInfo Returns info of oldest ledger from ledgers with sequences greater or equal...
Definition Node.cpp:433
std::variant< RelationalDatabase::AccountTx, TxSearched > getTransaction(soci::session &session, Application &app, uint256 const &id, std::optional< ClosedInterval< uint32_t > > const &range, error_code_i &ec)
getTransaction Returns transaction with given hash.
Definition Node.cpp:1061
DatabasePairValid makeLedgerDBs(Config const &config, DatabaseCon::Setup const &setup, DatabaseCon::CheckpointerSetup const &checkpointerSetup, beast::Journal j)
makeLedgerDBs Opens ledger and transactions databases.
Definition Node.cpp:49
RelationalDatabase::CountMinMax getRowsMinMax(soci::session &session, TableType type)
getRowsMinMax Returns minimum ledger sequence, maximum ledger sequence and total number of rows in gi...
Definition Node.cpp:144
std::size_t getRows(soci::session &session, TableType type)
getRows Returns number of rows in given table.
Definition Node.cpp:132
std::optional< LedgerHeader > getLedgerInfoByIndex(soci::session &session, LedgerIndex ledgerSeq, beast::Journal j)
getLedgerInfoByIndex Returns ledger by its sequence.
Definition Node.cpp:417
std::pair< std::vector< RelationalDatabase::txnMetaLedgerType >, int > getNewestAccountTxsB(soci::session &session, Application &app, RelationalDatabase::AccountTxOptions const &options, beast::Journal j)
getNewestAccountTxsB Returns newest transactions in binary form for given account which match given c...
Definition Node.cpp:867
uint256 getHashByIndex(soci::session &session, LedgerIndex ledgerIndex)
getHashByIndex Returns hash of ledger with given sequence.
Definition Node.cpp:457
void deleteByLedgerSeq(soci::session &session, TableType type, LedgerIndex ledgerSeq)
deleteByLedgerSeq Deletes all entries in given table for the ledger with given sequence.
Definition Node.cpp:120
std::pair< RelationalDatabase::AccountTxs, int > getOldestAccountTxs(soci::session &session, Application &app, LedgerMaster &ledgerMaster, RelationalDatabase::AccountTxOptions const &options, beast::Journal j)
getOldestAccountTxs Returns oldest transactions for given account which match given criteria starting...
Definition Node.cpp:764
bool dbHasSpace(soci::session &session, Config const &config, beast::Journal j)
dbHasSpace Checks if given database has available space.
Definition Node.cpp:1136
std::optional< LedgerHeader > getLimitedNewestLedgerInfo(soci::session &session, LedgerIndex ledgerFirstIndex, beast::Journal j)
getLimitedNewestLedgerInfo Returns info of newest ledger from ledgers with sequences greater or equal...
Definition Node.cpp:441
std::pair< std::optional< RelationalDatabase::AccountTxMarker >, int > oldestAccountTxPage(soci::session &session, std::function< void(std::uint32_t)> const &onUnsavedLedger, std::function< void(std::uint32_t, std::string const &, Blob &&, Blob &&)> const &onTransaction, RelationalDatabase::AccountTxPageOptions const &options, std::uint32_t page_length)
oldestAccountTxPage Searches oldest transactions for given account which match given criteria startin...
Definition Node.cpp:1039
std::pair< std::optional< RelationalDatabase::AccountTxMarker >, int > newestAccountTxPage(soci::session &session, std::function< void(std::uint32_t)> const &onUnsavedLedger, std::function< void(std::uint32_t, std::string const &, Blob &&, Blob &&)> const &onTransaction, RelationalDatabase::AccountTxPageOptions const &options, std::uint32_t page_length)
newestAccountTxPage Searches newest transactions for given account which match given criteria startin...
Definition Node.cpp:1050
std::optional< LedgerHashPair > getHashesByIndex(soci::session &session, LedgerIndex ledgerIndex, beast::Journal j)
getHashesByIndex Returns hash of the ledger and hash of parent ledger for the ledger of given sequenc...
Definition Node.cpp:486
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
void saveLedgerAsync(Application &app, std::uint32_t seq)
ClosedInterval< T > range(T low, T high)
Create a closed range interval.
Definition RangeSet.h:34
std::uint32_t getKBUsedDB(soci::session &s)
Definition SociDB.cpp:110
std::uint32_t getKBUsedAll(soci::session &s)
Definition SociDB.cpp:102
void convertBlobsToTxResult(RelationalDatabase::AccountTxs &to, std::uint32_t ledger_index, std::string const &status, Blob const &rawTxn, Blob const &rawMeta, Application &app)
@ current
This was a new validation and was added.
base_uint< 256 > uint256
Definition base_uint.h:526
boost::icl::closed_interval< T > ClosedInterval
A closed interval over the domain T.
Definition RangeSet.h:25
DatabaseCon::Setup setup_DatabaseCon(Config const &c, std::optional< beast::Journal > j=std::nullopt)
Definition Config.cpp:1043
@ ledgerMaster
ledger master data for signing
SQLiteDatabase setup_RelationalDatabase(ServiceRegistry &registry, Config const &config, JobQueue &jobQueue)
setup_RelationalDatabase Creates and returns a SQLiteDatabase instance based on configuration.
error_code_i
Definition ErrorCodes.h:20
T ref(T... args)