|
rippled
|


Public Types | |
| using | AccountTx = std::pair< std::shared_ptr< Transaction >, std::shared_ptr< TxMeta > > |
| using | AccountTxs = std::vector< AccountTx > |
| using | txnMetaLedgerType = std::tuple< Blob, Blob, std::uint32_t > |
| using | MetaTxsList = std::vector< txnMetaLedgerType > |
| using | LedgerSequence = uint32_t |
| using | LedgerHash = uint256 |
| using | LedgerShortcut = RPC::LedgerShortcut |
| using | LedgerSpecifier = std::variant< LedgerRange, LedgerShortcut, LedgerSequence, LedgerHash > |
Public Member Functions | |
| PostgresDatabaseImp (Application &app, Config const &config, JobQueue &jobQueue) | |
| void | stop () override |
| void | sweep () override |
| sweep Sweeps the database. More... | |
| std::optional< LedgerIndex > | getMinLedgerSeq () override |
| getMinLedgerSeq Returns the minimum ledger sequence in the Ledgers table. More... | |
| std::optional< LedgerIndex > | getMaxLedgerSeq () override |
| getMaxLedgerSeq Returns the maximum ledger sequence in the Ledgers table. More... | |
| std::string | getCompleteLedgers () override |
| getCompleteLedgers Returns a string which contains a list of completed ledgers. More... | |
| std::chrono::seconds | getValidatedLedgerAge () override |
| getValidatedLedgerAge Returns the age of the last validated ledger. More... | |
| bool | writeLedgerAndTransactions (LedgerInfo const &info, std::vector< AccountTransactionsData > const &accountTxData) override |
| writeLedgerAndTransactions Writes new ledger and transaction data into the database. More... | |
| std::optional< LedgerInfo > | getLedgerInfoByIndex (LedgerIndex ledgerSeq) override |
| getLedgerInfoByIndex Returns a ledger by its sequence. More... | |
| std::optional< LedgerInfo > | getNewestLedgerInfo () override |
| getNewestLedgerInfo Returns the info of the newest saved ledger. More... | |
| std::optional< LedgerInfo > | getLedgerInfoByHash (uint256 const &ledgerHash) override |
| getLedgerInfoByHash Returns the info of the ledger with given hash. More... | |
| uint256 | getHashByIndex (LedgerIndex ledgerIndex) override |
| getHashByIndex Returns the hash of the ledger with the given sequence. More... | |
| std::optional< LedgerHashPair > | getHashesByIndex (LedgerIndex ledgerIndex) override |
| getHashesByIndex Returns the hashes of the ledger and its parent as specified by the ledgerIndex. More... | |
| std::map< LedgerIndex, LedgerHashPair > | getHashesByIndex (LedgerIndex minSeq, LedgerIndex maxSeq) override |
| getHashesByIndex Returns hashes of each ledger and its parent for all ledgers within the provided range. More... | |
| std::vector< uint256 > | getTxHashes (LedgerIndex seq) override |
| getTxHashes Returns a vector of the hashes of transactions belonging to the ledger with the provided sequence. More... | |
| std::vector< std::shared_ptr< Transaction > > | getTxHistory (LedgerIndex startIndex) override |
| getTxHistory Returns the 20 most recent transactions starting from the given number. More... | |
| std::pair< AccountTxResult, RPC::Status > | getAccountTx (AccountTxArgs const &args) override |
| getAccountTx Get the last account transactions specified by the AccountTxArgs struct. More... | |
| Transaction::Locator | locateTransaction (uint256 const &id) override |
| locateTransaction Returns information used to locate a transaction. More... | |
| bool | ledgerDbHasSpace (Config const &config) override |
| ledgerDbHasSpace Checks if the ledger database has available space. More... | |
| bool | transactionDbHasSpace (Config const &config) override |
| transactionDbHasSpace Checks if the transaction database has available space. More... | |
| bool | isCaughtUp (std::string &reason) override |
| isCaughtUp returns whether the database is caught up with the network More... | |
Static Public Member Functions | |
| static std::unique_ptr< RelationalDatabase > | init (Application &app, Config const &config, JobQueue &jobQueue) |
| init Creates and returns an appropriate RelationalDatabase instance based on configuration. More... | |
Private Member Functions | |
| bool | dbHasSpace (Config const &config) |
Private Attributes | |
| Application & | app_ |
| beast::Journal | j_ |
| std::shared_ptr< PgPool > | pgPool_ |
Definition at line 49 of file PostgresDatabase.cpp.
|
inherited |
Definition at line 85 of file RelationalDatabase.h.
|
inherited |
Definition at line 86 of file RelationalDatabase.h.
|
inherited |
Definition at line 87 of file RelationalDatabase.h.
|
inherited |
Definition at line 88 of file RelationalDatabase.h.
|
inherited |
Definition at line 90 of file RelationalDatabase.h.
|
inherited |
Definition at line 91 of file RelationalDatabase.h.
|
inherited |
Definition at line 92 of file RelationalDatabase.h.
|
inherited |
Definition at line 94 of file RelationalDatabase.h.
| ripple::PostgresDatabaseImp::PostgresDatabaseImp | ( | Application & | app, |
| Config const & | config, | ||
| JobQueue & | jobQueue | ||
| ) |
Definition at line 52 of file PostgresDatabase.cpp.
|
overridevirtual |
Implements ripple::PostgresDatabase.
Definition at line 74 of file PostgresDatabase.cpp.
|
overridevirtual |
sweep Sweeps the database.
Implements ripple::PostgresDatabase.
Definition at line 484 of file PostgresDatabase.cpp.
|
overridevirtual |
getMinLedgerSeq Returns the minimum ledger sequence in the Ledgers table.
Implements ripple::RelationalDatabase.
Definition at line 492 of file PostgresDatabase.cpp.
|
overridevirtual |
getMaxLedgerSeq Returns the maximum ledger sequence in the Ledgers table.
Implements ripple::RelationalDatabase.
Definition at line 507 of file PostgresDatabase.cpp.
|
overridevirtual |
getCompleteLedgers Returns a string which contains a list of completed ledgers.
Implements ripple::PostgresDatabase.
Definition at line 518 of file PostgresDatabase.cpp.
|
overridevirtual |
getValidatedLedgerAge Returns the age of the last validated ledger.
Implements ripple::PostgresDatabase.
Definition at line 529 of file PostgresDatabase.cpp.
|
overridevirtual |
writeLedgerAndTransactions Writes new ledger and transaction data into the database.
| info | Ledger info to write. |
| accountTxData | Transaction data to write |
Implements ripple::PostgresDatabase.
Definition at line 543 of file PostgresDatabase.cpp.
|
overridevirtual |
getLedgerInfoByIndex Returns a ledger by its sequence.
| ledgerSeq | Ledger sequence. |
Implements ripple::RelationalDatabase.
Definition at line 628 of file PostgresDatabase.cpp.
|
overridevirtual |
getNewestLedgerInfo Returns the info of the newest saved ledger.
Implements ripple::RelationalDatabase.
Definition at line 634 of file PostgresDatabase.cpp.
|
overridevirtual |
getLedgerInfoByHash Returns the info of the ledger with given hash.
| ledgerHash | Hash of the ledger. |
Implements ripple::RelationalDatabase.
Definition at line 640 of file PostgresDatabase.cpp.
|
overridevirtual |
getHashByIndex Returns the hash of the ledger with the given sequence.
| ledgerIndex | Ledger sequence. |
Implements ripple::RelationalDatabase.
Definition at line 646 of file PostgresDatabase.cpp.
|
overridevirtual |
getHashesByIndex Returns the hashes of the ledger and its parent as specified by the ledgerIndex.
| ledgerIndex | Ledger sequence. |
Implements ripple::RelationalDatabase.
Definition at line 656 of file PostgresDatabase.cpp.
|
overridevirtual |
getHashesByIndex Returns hashes of each ledger and its parent for all ledgers within the provided range.
| minSeq | Minimum ledger sequence. |
| maxSeq | Maximum ledger sequence. |
Implements ripple::RelationalDatabase.
Definition at line 671 of file PostgresDatabase.cpp.
|
overridevirtual |
getTxHashes Returns a vector of the hashes of transactions belonging to the ledger with the provided sequence.
| seq | Ledger sequence |
Implements ripple::PostgresDatabase.
Definition at line 683 of file PostgresDatabase.cpp.
|
overridevirtual |
getTxHistory Returns the 20 most recent transactions starting from the given number.
| startIndex | First number of returned entry. |
Implements ripple::RelationalDatabase.
Definition at line 753 of file PostgresDatabase.cpp.
|
overridevirtual |
getAccountTx Get the last account transactions specified by the AccountTxArgs struct.
| args | Arguments which specify the account and which transactions to return. |
Implements ripple::PostgresDatabase.
Definition at line 844 of file PostgresDatabase.cpp.
|
overridevirtual |
locateTransaction Returns information used to locate a transaction.
| id | Hash of the transaction. |
Implements ripple::PostgresDatabase.
Definition at line 955 of file PostgresDatabase.cpp.
|
overridevirtual |
ledgerDbHasSpace Checks if the ledger database has available space.
| config | Config object. |
Implements ripple::RelationalDatabase.
Definition at line 1040 of file PostgresDatabase.cpp.
|
overridevirtual |
transactionDbHasSpace Checks if the transaction database has available space.
| config | Config object. |
Implements ripple::RelationalDatabase.
Definition at line 1046 of file PostgresDatabase.cpp.
|
overridevirtual |
isCaughtUp returns whether the database is caught up with the network
| [out] | reason | if the database is not caught up, reason contains a helpful message describing why |
Implements ripple::PostgresDatabase.
Definition at line 1058 of file PostgresDatabase.cpp.
|
private |
Definition at line 1032 of file PostgresDatabase.cpp.
|
staticinherited |
init Creates and returns an appropriate RelationalDatabase instance based on configuration.
| app | Application object. |
| config | Config object. |
| jobQueue | JobQueue object. |
Definition at line 34 of file RelationalDatabase.cpp.
|
private |
Definition at line 141 of file PostgresDatabase.cpp.
|
private |
Definition at line 142 of file PostgresDatabase.cpp.
|
private |
Definition at line 143 of file PostgresDatabase.cpp.
1.8.17