mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
refactor Transaction. compiling. still need to test
This commit is contained in:
41
src/cpp/ripple/Transactor.h
Normal file
41
src/cpp/ripple/Transactor.h
Normal file
@@ -0,0 +1,41 @@
|
||||
#ifndef __TRANSACTOR__
|
||||
#define __TRANSACTOR__
|
||||
|
||||
#include "SerializedTransaction.h"
|
||||
#include "TransactionErr.h"
|
||||
#include "TransactionEngine.h"
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
class Transactor
|
||||
{
|
||||
protected:
|
||||
const SerializedTransaction& mTxn;
|
||||
TransactionEngine::pointer mEngine;
|
||||
TransactionEngineParams mParams;
|
||||
|
||||
uint160 mTxnAccountID;
|
||||
STAmount mFeeDue;
|
||||
STAmount mSourceBalance;
|
||||
SLE::pointer mTxnAccount;
|
||||
bool mHasAuthKey;
|
||||
RippleAddress mSigningPubKey;
|
||||
|
||||
|
||||
TER preCheck();
|
||||
TER checkSeq();
|
||||
TER payFee();
|
||||
virtual void calculateFee();
|
||||
virtual TER checkSig();
|
||||
virtual TER doApply()=0;
|
||||
|
||||
Transactor(const SerializedTransaction& txn, TransactionEngineParams params, TransactionEngine::pointer engine);
|
||||
|
||||
public:
|
||||
typedef boost::shared_ptr<Transactor> pointer;
|
||||
|
||||
static Transactor::pointer makeTransactor(const SerializedTransaction& txn,TransactionEngineParams params, TransactionEngine::pointer engine);
|
||||
|
||||
TER apply();
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user