mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
It makes much more sense this way:
LedgerEngine: Performs high-level ledger operations. TransactionEngine: Performs high-level transaction operations.
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
#define __TRANSACTIONENGINE__
|
||||
|
||||
#include "Ledger.h"
|
||||
#include "LedgerEngine.h"
|
||||
#include "Currency.h"
|
||||
#include "SerializedTransaction.h"
|
||||
#include "SerializedLedger.h"
|
||||
|
||||
@@ -32,7 +34,7 @@ enum TransactionEngineParams
|
||||
class TransactionEngine
|
||||
{
|
||||
protected:
|
||||
Ledger::pointer mTargetLedger;
|
||||
LedgerEngine::pointer mTxnEngine;
|
||||
|
||||
TransactionEngineResult doPayment(const SerializedTransaction&, SerializedLedgerEntry& source);
|
||||
TransactionEngineResult doInvoice(const SerializedTransaction&, SerializedLedgerEntry& source);
|
||||
@@ -43,10 +45,11 @@ protected:
|
||||
TransactionEngineResult doDelete(const SerializedTransaction&, SerializedLedgerEntry& source);
|
||||
|
||||
public:
|
||||
TransactionEngine(Ledger::pointer targetLedger) : mTargetLedger(targetLedger) { ; }
|
||||
TransactionEngine() { ; }
|
||||
TransactionEngine(LedgerEngine::pointer txnEngine) : mTxnEngine(txnEngine) { ; }
|
||||
|
||||
Ledger::pointer getTargetLedger() { return mTargetLedger; }
|
||||
void setTargetLedger(Ledger::pointer targetLedger) { mTargetLedger = targetLedger; }
|
||||
LedgerEngine::pointer getLedgerEngine() { return mTxnEngine; }
|
||||
void setLedgerEngine(LedgerEngine::pointer engine) { mTxnEngine = engine; }
|
||||
|
||||
TransactionEngineResult applyTransaction(const SerializedTransaction&, TransactionEngineParams);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user