diff --git a/src/Ledger.cpp b/src/Ledger.cpp index b22fdcd2b..abac688f7 100644 --- a/src/Ledger.cpp +++ b/src/Ledger.cpp @@ -160,6 +160,12 @@ bool Ledger::addTransaction(Transaction::pointer trans) 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(txID, txn.peekData()); + return mTransactionMap->addGiveItem(item, true); +} + bool Ledger::delTransaction(const uint256& transID) { assert(!mAccepted); diff --git a/src/Ledger.h b/src/Ledger.h index 7c670c1c4..f23d79630 100644 --- a/src/Ledger.h +++ b/src/Ledger.h @@ -20,6 +20,8 @@ enum LedgerStateParms { + lepNONE = 0, // no special flags + // input flags lepCREATE, // Create if not present @@ -33,6 +35,7 @@ enum LedgerStateParms class Ledger : public boost::enable_shared_from_this { // The basic Ledger structure, can be opened, closed, or synching + friend class TransactionEngine; public: typedef boost::shared_ptr pointer; @@ -73,6 +76,7 @@ protected: bool addAccountState(AccountState::pointer); bool updateAccountState(AccountState::pointer); bool addTransaction(Transaction::pointer); + bool addTransaction(const uint256& id, const Serializer& txn); bool delTransaction(const uint256& id); static Ledger::pointer getSQL(const std::string& sqlStatement);