Skip to content

Commit 15506e5

Browse files
committed
Modify STTxWr
1 parent 5f5b265 commit 15506e5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

include/xrpl/protocol/STTxWr.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ namespace ripple {
3535
class STTxWr
3636
{
3737
private:
38-
STTx tx_; // Wrap an instance of STTx
38+
const STTx& tx_; // Wrap an instance of STTx
3939
bool isDelegated_; // if the transaction is delegated by another account
4040

4141
public:
42-
explicit STTxWr(STTx tx, bool isDelegated)
42+
explicit STTxWr(STTx const& tx, bool isDelegated)
4343
: tx_(tx), isDelegated_(isDelegated)
4444
{
4545
}

src/xrpld/app/tx/detail/Transactor.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ preflight1(PreflightContext const& ctx)
9797
if (!isTesSuccess(ret))
9898
return ret;
9999

100-
auto const id = ctx.tx.getAccountID(sfAccount);
100+
auto const id = ctx.tx.getTx().getAccountID(sfAccount);
101101
if (id == beast::zero)
102102
{
103103
JLOG(ctx.j.warn()) << "preflight1: bad account id";
@@ -271,7 +271,7 @@ Transactor::checkFee(PreclaimContext const& ctx, XRPAmount baseFee)
271271
if (feePaid == beast::zero)
272272
return tesSUCCESS;
273273

274-
auto const id = ctx.tx.getAccountID(sfAccount);
274+
auto const id = ctx.tx.getTx().getAccountID(sfAccount);
275275
auto const sle = ctx.view.read(keylet::account(id));
276276
if (!sle)
277277
return terNO_ACCOUNT;
@@ -406,7 +406,7 @@ Transactor::checkSeqProxy(
406406
NotTEC
407407
Transactor::checkPriorTxAndLastLedger(PreclaimContext const& ctx)
408408
{
409-
auto const id = ctx.tx.getAccountID(sfAccount);
409+
auto const id = ctx.tx.getTx().getAccountID(sfAccount);
410410

411411
auto const sle = ctx.view.read(keylet::account(id));
412412

@@ -639,7 +639,7 @@ Transactor::checkSingleSign(PreclaimContext const& ctx)
639639
NotTEC
640640
Transactor::checkMultiSign(PreclaimContext const& ctx)
641641
{
642-
auto const id = ctx.tx.getAccountID(sfAccount);
642+
auto const id = ctx.tx.getTx().getAccountID(sfAccount);
643643
// Get mTxnAccountID's SignerList and Quorum.
644644
std::shared_ptr<STLedgerEntry const> sleAccountSigners =
645645
ctx.view.read(keylet::signers(id));

0 commit comments

Comments
 (0)