mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Missing functions, and an easy way to specify no special parameters.
This commit is contained in:
@@ -160,6 +160,12 @@ bool Ledger::addTransaction(Transaction::pointer trans)
|
|||||||
return mTransactionMap->addGiveItem(item, true);
|
return mTransactionMap->addGiveItem(item, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Ledger::addTransaction(const uint256& txID, const Serializer& txn)
|
||||||
|
{ // low-level - just add to table
|
||||||
|
SHAMapItem::pointer item = boost::make_shared<SHAMapItem>(txID, txn.peekData());
|
||||||
|
return mTransactionMap->addGiveItem(item, true);
|
||||||
|
}
|
||||||
|
|
||||||
bool Ledger::delTransaction(const uint256& transID)
|
bool Ledger::delTransaction(const uint256& transID)
|
||||||
{
|
{
|
||||||
assert(!mAccepted);
|
assert(!mAccepted);
|
||||||
|
|||||||
@@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
enum LedgerStateParms
|
enum LedgerStateParms
|
||||||
{
|
{
|
||||||
|
lepNONE = 0, // no special flags
|
||||||
|
|
||||||
// input flags
|
// input flags
|
||||||
lepCREATE, // Create if not present
|
lepCREATE, // Create if not present
|
||||||
|
|
||||||
@@ -33,6 +35,7 @@ enum LedgerStateParms
|
|||||||
|
|
||||||
class Ledger : public boost::enable_shared_from_this<Ledger>
|
class Ledger : public boost::enable_shared_from_this<Ledger>
|
||||||
{ // The basic Ledger structure, can be opened, closed, or synching
|
{ // The basic Ledger structure, can be opened, closed, or synching
|
||||||
|
friend class TransactionEngine;
|
||||||
public:
|
public:
|
||||||
typedef boost::shared_ptr<Ledger> pointer;
|
typedef boost::shared_ptr<Ledger> pointer;
|
||||||
|
|
||||||
@@ -73,6 +76,7 @@ protected:
|
|||||||
bool addAccountState(AccountState::pointer);
|
bool addAccountState(AccountState::pointer);
|
||||||
bool updateAccountState(AccountState::pointer);
|
bool updateAccountState(AccountState::pointer);
|
||||||
bool addTransaction(Transaction::pointer);
|
bool addTransaction(Transaction::pointer);
|
||||||
|
bool addTransaction(const uint256& id, const Serializer& txn);
|
||||||
bool delTransaction(const uint256& id);
|
bool delTransaction(const uint256& id);
|
||||||
|
|
||||||
static Ledger::pointer getSQL(const std::string& sqlStatement);
|
static Ledger::pointer getSQL(const std::string& sqlStatement);
|
||||||
|
|||||||
Reference in New Issue
Block a user