From df4891c4a7e0de73894ce9367f61af07003eeeda Mon Sep 17 00:00:00 2001 From: Denis Angell Date: Mon, 12 Jun 2023 00:01:34 +0000 Subject: [PATCH] update no autofill (change autosign) --- src/test/app/NetworkID_test.cpp | 2 +- src/test/jtx/Env.h | 9 ++++++--- src/test/jtx/impl/Env.cpp | 7 +++++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/test/app/NetworkID_test.cpp b/src/test/app/NetworkID_test.cpp index 830a931e2..20dc9624a 100644 --- a/src/test/app/NetworkID_test.cpp +++ b/src/test/app/NetworkID_test.cpp @@ -129,7 +129,7 @@ public: jvn[jss::Fee] = to_string(env.current()->fees().base); jvn[jss::Sequence] = env.seq(alice); jvn[jss::LastLedgerSequence] = env.current()->info().seq + 2; - auto jt = env.jtnofill(jvn); + auto jt = env.jtnofill(jvn, alice); Serializer s; jt.stx->add(s); BEAST_EXPECT(env.rpc("submit", strHex(s.slice()))[jss::result][jss::engine_result] == "telREQUIRES_NETWORK_ID"); diff --git a/src/test/jtx/Env.h b/src/test/jtx/Env.h index 6002031b3..61b2c410a 100644 --- a/src/test/jtx/Env.h +++ b/src/test/jtx/Env.h @@ -446,13 +446,13 @@ public: } /** Create a JTx from parameters. */ - template + template JTx - jtnofill(JsonValue&& jv, FN const&... fN) + jtnofill(JsonValue&& jv, Account account, FN const&... fN) { JTx jt(std::forward(jv)); invoke(jt, fN...); - autofill_sig(jt); + nofill_sig(jt, account); jt.stx = st(jt); return jt; } @@ -664,6 +664,9 @@ protected: void autofill_sig(JTx& jt); + void + nofill_sig(JTx& jt, Account account); + virtual void autofill(JTx& jt); diff --git a/src/test/jtx/impl/Env.cpp b/src/test/jtx/impl/Env.cpp index 4ebc9e8b0..38dfb340c 100644 --- a/src/test/jtx/impl/Env.cpp +++ b/src/test/jtx/impl/Env.cpp @@ -424,6 +424,13 @@ Env::autofill_sig(JTx& jt) jtx::sign(jv, account); } +void +Env::nofill_sig(JTx& jt, Account account) +{ + auto& jv = jt.jv; + jtx::sign(jv, account); +} + void Env::autofill(JTx& jt) {