138 cfg->fees.referenceFee = 10;
142 env.fund(
XRP(10000), a1);
152 return j.isMember(jss::result) && (j[jss::result][jss::status] ==
"success") &&
153 (j[jss::result][jss::transactions].size() == 2) &&
154 (j[jss::result][jss::transactions][0u][jss::tx][jss::TransactionType] ==
156 (j[jss::result][jss::transactions][1u][jss::tx][jss::TransactionType] ==
158 (j[jss::result][jss::transactions][1u][jss::tx][jss::DeliverMax] ==
160 (j[jss::result][jss::transactions][1u][jss::tx][jss::Amount] ==
161 j[jss::result][jss::transactions][1u][jss::tx][jss::DeliverMax]);
164 if (j.isMember(jss::result) && (j[jss::result][jss::status] ==
"success") &&
165 (j[jss::result][jss::transactions].size() == 2) &&
166 (j[jss::result][jss::transactions][0u][jss::tx_json]
167 [jss::TransactionType] == jss::AccountSet))
169 auto const& payment = j[jss::result][jss::transactions][1u];
171 return (payment.isMember(jss::tx_json)) &&
172 (payment[jss::tx_json][jss::TransactionType] == jss::Payment) &&
173 (payment[jss::tx_json][jss::DeliverMax] ==
"10000000010") &&
174 (!payment[jss::tx_json].isMember(jss::Amount)) &&
175 (!payment[jss::tx_json].isMember(jss::hash)) &&
176 (payment[jss::hash] ==
177 "9F3085D85F472D1CC29627F260DF68EDE59D42D1D0C33E345"
178 "ECF0D4CE981D0A8") &&
179 (payment[jss::validated] ==
true) &&
180 (payment[jss::ledger_index] == 3) &&
181 (payment[jss::ledger_hash] ==
182 "5476DCD816EA04CBBA57D47BBF1FC58A5217CC93A5ADD79CB"
183 "580A5AFDD727E33") &&
184 (payment[jss::close_time_iso] ==
"2000-01-01T00:00:10Z");
197 return j.isMember(jss::result) && (j[jss::result][jss::status] ==
"success") &&
198 (j[jss::result][jss::transactions].size() == 0);
207 jParams[jss::api_version] = apiVersion;
211 jParams[jss::account] =
"0xDEADBEEF";
215 jParams[jss::account] = a1.human();
216 BEAST_EXPECT(hasTxs(env.rpc(apiVersion,
"json",
"account_tx",
to_string(jParams))));
221 p[jss::ledger_index_min] = -1;
222 p[jss::ledger_index_max] = -1;
223 BEAST_EXPECT(hasTxs(env.rpc(apiVersion,
"json",
"account_tx",
to_string(p))));
225 p[jss::ledger_index_min] = 0;
226 p[jss::ledger_index_max] = 100;
229 BEAST_EXPECT(hasTxs(env.rpc(apiVersion,
"json",
"account_tx",
to_string(p))));
237 p[jss::ledger_index_min] = 1;
238 p[jss::ledger_index_max] = 2;
241 BEAST_EXPECT(noTxs(env.rpc(
"json",
"account_tx",
to_string(p))));
249 p[jss::ledger_index_min] = 2;
250 p[jss::ledger_index_max] = 1;
252 env.rpc(
"json",
"account_tx",
to_string(p)),
258 p[jss::ledger_index_min] = -1;
259 BEAST_EXPECT(hasTxs(env.rpc(apiVersion,
"json",
"account_tx",
to_string(p))));
261 p[jss::ledger_index_min] = 1;
264 BEAST_EXPECT(hasTxs(env.rpc(apiVersion,
"json",
"account_tx",
to_string(p))));
272 p[jss::ledger_index_min] = env.current()->header().seq;
274 env.rpc(
"json",
"account_tx",
to_string(p)),
281 p[jss::ledger_index_max] = -1;
282 BEAST_EXPECT(hasTxs(env.rpc(apiVersion,
"json",
"account_tx",
to_string(p))));
284 p[jss::ledger_index_max] = env.current()->header().seq;
287 BEAST_EXPECT(hasTxs(env.rpc(apiVersion,
"json",
"account_tx",
to_string(p))));
295 p[jss::ledger_index_max] = 3;
296 BEAST_EXPECT(hasTxs(env.rpc(apiVersion,
"json",
"account_tx",
to_string(p))));
298 p[jss::ledger_index_max] = env.closed()->header().seq;
299 BEAST_EXPECT(hasTxs(env.rpc(apiVersion,
"json",
"account_tx",
to_string(p))));
301 p[jss::ledger_index_max] = env.closed()->header().seq - 1;
302 BEAST_EXPECT(noTxs(env.rpc(
"json",
"account_tx",
to_string(p))));
309 p[jss::ledger_index] = env.closed()->header().seq;
310 BEAST_EXPECT(hasTxs(env.rpc(apiVersion,
"json",
"account_tx",
to_string(p))));
312 p[jss::ledger_index] = env.closed()->header().seq - 1;
313 BEAST_EXPECT(noTxs(env.rpc(
"json",
"account_tx",
to_string(p))));
315 p[jss::ledger_index] = env.current()->header().seq;
318 p[jss::ledger_index] = env.current()->header().seq + 1;
326 p[jss::ledger_hash] =
to_string(env.closed()->header().hash);
327 BEAST_EXPECT(hasTxs(env.rpc(apiVersion,
"json",
"account_tx",
to_string(p))));
329 p[jss::ledger_hash] =
to_string(env.closed()->header().parentHash);
330 BEAST_EXPECT(noTxs(env.rpc(
"json",
"account_tx",
to_string(p))));
336 jParams[jss::account] =
"0xDEADBEEF";
337 jParams[jss::account] = a1.human();
340 p[jss::ledger_index_max] = -1;
341 p[jss::ledger_index_min] = -1;
342 p[jss::ledger_index] = -1;
346 BEAST_EXPECT(hasTxs(env.rpc(apiVersion,
"json",
"account_tx",
to_string(p))));
357 p[jss::ledger_index_max] = env.current()->header().seq;
360 BEAST_EXPECT(hasTxs(env.rpc(apiVersion,
"json",
"account_tx",
to_string(p))));
370 auto testInvalidAccountParam = [&](
auto const& param) {
372 params[jss::account] = param;
373 auto jrr = env.rpc(
"json",
"account_tx",
to_string(params))[jss::result];
374 BEAST_EXPECT(jrr[jss::error] ==
"invalidParams");
375 BEAST_EXPECT(jrr[jss::error_message] ==
"Invalid field 'account'.");
378 testInvalidAccountParam(1);
379 testInvalidAccountParam(1.1);
380 testInvalidAccountParam(
true);
388 p[jss::binary] =
"asdf";
392 BEAST_EXPECT(result[jss::result][jss::status] ==
"success");
399 p[jss::binary] =
true;
401 BEAST_EXPECT(result[jss::result][jss::status] ==
"success");
403 p[jss::forward] =
"true";
406 BEAST_EXPECT(result[jss::result][jss::status] ==
"success");
413 p[jss::forward] =
false;
414 result = env.rpc(
"json",
"account_tx",
to_string(p));
415 BEAST_EXPECT(result[jss::result][jss::status] ==
"success");
428 env.rpc(
"json",
"account_tx",
to_string(p))[jss::result][jss::error_message] ==
432 p[jss::limit] =
"10";
434 env.rpc(
"json",
"account_tx",
to_string(p))[jss::result][jss::error_message] ==
438 p[jss::limit] =
true;
440 env.rpc(
"json",
"account_tx",
to_string(p))[jss::result][jss::error_message] ==
444 p[jss::limit] =
false;
446 env.rpc(
"json",
"account_tx",
to_string(p))[jss::result][jss::error_message] ==
452 env.rpc(
"json",
"account_tx",
to_string(p))[jss::result][jss::error_message] ==
458 env.rpc(
"json",
"account_tx",
to_string(p))[jss::result][jss::error_message] ==
464 env.rpc(
"json",
"account_tx",
to_string(p))[jss::result][jss::error_message] ==
468 p[jss::limit] =
"malformed";
470 env.rpc(
"json",
"account_tx",
to_string(p))[jss::result][jss::error_message] ==
475 p[jss::limit].
append(
"limit");
477 env.rpc(
"json",
"account_tx",
to_string(p))[jss::result][jss::error_message] ==
483 p[jss::limit][jss::limit] = 10;
485 env.rpc(
"json",
"account_tx",
to_string(p))[jss::result][jss::error_message] ==
491 env.rpc(
"json",
"account_tx",
to_string(p))[jss::result][jss::status] ==
"success");
503 using namespace std::chrono_literals;
509 auto const usd{gw[
"USD"]};
511 env.
fund(
XRP(1000000), alice, gw);
518 env(
pay(alice, gw,
XRP(100)));
525 env(
trust(alice, usd(200)),
Sig(alie));
534 env(
signers(alice, 1, {{
"bogie", 1}, {
"demon", 1}}),
Sig(alie));
541 escrow[jss::TransactionType] = jss::EscrowCreate;
542 escrow[jss::Account] = account.human();
543 escrow[jss::Destination] = to.human();
551 escrowWithFinish[sfFinishAfter.jsonName] = nextTime.
time_since_epoch().count();
554 env(escrowWithFinish,
Sig(alie));
557 escrowWithCancel[sfFinishAfter.jsonName] = nextTime.
time_since_epoch().count();
558 escrowWithCancel[sfCancelAfter.jsonName] = nextTime.
time_since_epoch().count() + 1;
561 env(escrowWithCancel,
Sig(alie));
566 escrowFinish[jss::TransactionType] = jss::EscrowFinish;
567 escrowFinish[jss::Account] = alice.
human();
568 escrowFinish[sfOwner.jsonName] = alice.
human();
569 escrowFinish[sfOfferSequence.jsonName] = escrowFinishSeq;
570 env(escrowFinish,
Sig(alie));
574 escrowCancel[jss::TransactionType] = jss::EscrowCancel;
575 escrowCancel[jss::Account] = alice.
human();
576 escrowCancel[sfOwner.jsonName] = alice.
human();
577 escrowCancel[sfOfferSequence.jsonName] = escrowCancelSeq;
578 env(escrowCancel,
Sig(alie));
587 payChanCreate[jss::TransactionType] = jss::PaymentChannelCreate;
588 payChanCreate[jss::Account] = alice.
human();
589 payChanCreate[jss::Destination] = gw.
human();
592 payChanCreate[sfPublicKey.jsonName] =
strHex(alice.
pk().
slice());
593 env(payChanCreate,
Sig(alie));
601 payChanFund[jss::TransactionType] = jss::PaymentChannelFund;
602 payChanFund[jss::Account] = alice.
human();
603 payChanFund[sfChannel.jsonName] = payChanIndex;
605 env(payChanFund,
Sig(alie));
610 payChanClaim[jss::TransactionType] = jss::PaymentChannelClaim;
611 payChanClaim[jss::Flags] = tfClose;
612 payChanClaim[jss::Account] = gw.
human();
613 payChanClaim[sfChannel.jsonName] = payChanIndex;
614 payChanClaim[sfPublicKey.jsonName] =
strHex(alice.
pk().
slice());
622 auto const aliceCheckId =
646 params[jss::account] = alice.
human();
647 params[jss::ledger_index_min] = -1;
648 params[jss::ledger_index_max] = -1;
652 BEAST_EXPECT(result[jss::result][jss::status] ==
"success");
653 BEAST_EXPECT(result[jss::result][jss::transactions].isArray());
655 json::Value const& txs{result[jss::result][jss::transactions]};
662 {0, jss::DepositPreauth, {jss::DepositPreauth}, {jss::Ticket}, {jss::AccountRoot, jss::DirectoryNode}},
663 {1, jss::TicketCreate, {jss::Ticket}, {}, {jss::AccountRoot, jss::DirectoryNode}},
664 {2, jss::CheckCancel, {}, {jss::Check}, {jss::AccountRoot, jss::AccountRoot, jss::DirectoryNode, jss::DirectoryNode}},
665 {3, jss::CheckCash, {}, {jss::Check}, {jss::AccountRoot, jss::AccountRoot, jss::DirectoryNode, jss::DirectoryNode}},
666 {4, jss::CheckCreate, {jss::Check}, {}, {jss::AccountRoot, jss::AccountRoot, jss::DirectoryNode, jss::DirectoryNode}},
667 {5, jss::CheckCreate, {jss::Check}, {}, {jss::AccountRoot, jss::AccountRoot, jss::DirectoryNode, jss::DirectoryNode}},
668 {6, jss::PaymentChannelClaim, {}, {jss::PayChannel}, {jss::AccountRoot, jss::AccountRoot, jss::DirectoryNode, jss::DirectoryNode}},
669 {7, jss::PaymentChannelFund, {}, {}, {jss::AccountRoot, jss::PayChannel}},
670 {8, jss::PaymentChannelCreate, {jss::PayChannel}, {}, {jss::AccountRoot, jss::AccountRoot, jss::DirectoryNode, jss::DirectoryNode}},
671 {9, jss::EscrowCancel, {}, {jss::Escrow}, {jss::AccountRoot, jss::DirectoryNode}},
672 {10, jss::EscrowFinish, {}, {jss::Escrow}, {jss::AccountRoot, jss::DirectoryNode}},
673 {11, jss::EscrowCreate, {jss::Escrow}, {}, {jss::AccountRoot, jss::DirectoryNode}},
674 {12, jss::EscrowCreate, {jss::Escrow}, {}, {jss::AccountRoot, jss::DirectoryNode}},
675 {13, jss::SignerListSet, {jss::SignerList}, {}, {jss::AccountRoot, jss::DirectoryNode}},
676 {14, jss::OfferCancel, {}, {jss::Offer, jss::DirectoryNode}, {jss::AccountRoot, jss::DirectoryNode}},
677 {15, jss::OfferCreate, {jss::Offer, jss::DirectoryNode}, {}, {jss::AccountRoot, jss::DirectoryNode}},
678 {16, jss::TrustSet, {jss::RippleState, jss::DirectoryNode, jss::DirectoryNode}, {}, {jss::AccountRoot, jss::AccountRoot}},
679 {17, jss::SetRegularKey, {}, {}, {jss::AccountRoot}},
680 {18, jss::Payment, {}, {}, {jss::AccountRoot, jss::AccountRoot}},
681 {19, jss::AccountSet, {}, {}, {jss::AccountRoot}},
682 {20, jss::AccountSet, {}, {}, {jss::AccountRoot}},
683 {21, jss::Payment, {jss::AccountRoot}, {}, {jss::AccountRoot}},
687 BEAST_EXPECT(
std::size(kSanity) == result[jss::result][jss::transactions].size());
689 for (
unsigned int index{0}; index <
std::size(kSanity); ++index)
704 using namespace std::chrono_literals;
710 env.
fund(
XRP(10000), alice, becky);
715 BEAST_EXPECT(env.
closed()->exists(beckyAcctKey));
726 auto const beckyPreDelBalance{env.
balance(becky)};
728 auto const acctDelFee{
drops(env.
current()->fees().increment)};
733 BEAST_EXPECT(!env.
closed()->exists(beckyAcctKey));
745 { 0, jss::Payment, {}, {}, {jss::AccountRoot, jss::AccountRoot}},
746 { 1, jss::Payment, {jss::AccountRoot}, {}, {jss::AccountRoot}},
747 { 2, jss::AccountDelete, {}, {jss::AccountRoot}, {jss::AccountRoot}},
748 { 3, jss::AccountSet, {}, {}, {jss::AccountRoot}},
749 { 4, jss::AccountSet, {}, {}, {jss::AccountRoot}},
750 { 5, jss::Payment, {jss::AccountRoot}, {}, {jss::AccountRoot}}
758 params[jss::account] = becky.
human();
759 params[jss::ledger_index_min] = -1;
760 params[jss::ledger_index_max] = -1;
764 BEAST_EXPECT(result[jss::result][jss::status] ==
"success");
765 BEAST_EXPECT(result[jss::result][jss::transactions].isArray());
768 static constexpr unsigned int kBeckyDeletedOffset = 2;
771 result[jss::result][jss::transactions].size() + kBeckyDeletedOffset);
773 json::Value const& txs{result[jss::result][jss::transactions]};
775 for (
unsigned int index = kBeckyDeletedOffset; index <
std::size(kSanity); ++index)
777 checkSanity(txs[index - kBeckyDeletedOffset], kSanity[index]);
788 env(
pay(alice, becky,
XRP(45)));
792 BEAST_EXPECT(env.
closed()->exists(beckyAcctKey));
796 env(
pay(becky, alice,
XRP(20)));
802 params[jss::account] = becky.
human();
803 params[jss::ledger_index_min] = -1;
804 params[jss::ledger_index_max] = -1;
808 BEAST_EXPECT(result[jss::result][jss::status] ==
"success");
809 BEAST_EXPECT(result[jss::result][jss::transactions].isArray());
811 BEAST_EXPECT(
std::size(kSanity) == result[jss::result][jss::transactions].size());
813 json::Value const& txs{result[jss::result][jss::transactions]};
815 for (
unsigned int index = 0; index <
std::size(kSanity); ++index)
827 using namespace std::chrono_literals;
830 cfg->fees.referenceFee = 10;
831 Env env(*
this, std::move(cfg));
837 MPTTester mptAlice(env, alice, {.holders = {bob, carol}});
842 params[jss::account] = alice.
human();
843 params[jss::limit] = 100;
844 auto const jv = env.
rpc(
"json",
"account_tx",
to_string(params))[jss::result];
846 BEAST_EXPECT(jv[jss::transactions].size() == size);
847 auto const& tx0(jv[jss::transactions][0u][jss::tx]);
848 BEAST_EXPECT(tx0[jss::TransactionType] == txType);
852 BEAST_EXPECT(tx0[jss::hash] == txHash);
859 .flags = tfMPTCanClawback | tfMPTRequireAuth | tfMPTCanTransfer});
861 checkAliceAcctTx(3, jss::MPTokenIssuanceCreate);
864 mptAlice.authorize({.account = bob});
865 checkAliceAcctTx(4, jss::MPTokenAuthorize);
878 mptAlice.authorize({.account = alice, .holder = bob});
879 checkAliceAcctTx(5, jss::MPTokenAuthorize);
882 mptAlice.authorize({.account = carol});
883 checkAliceAcctTx(6, jss::MPTokenAuthorize);
886 mptAlice.authorize({.account = alice, .holder = carol});
887 checkAliceAcctTx(7, jss::MPTokenAuthorize);
890 mptAlice.pay(alice, bob, 100);
891 checkAliceAcctTx(8, jss::Payment);
894 mptAlice.pay(bob, carol, 10);
895 checkAliceAcctTx(9, jss::Payment);
910 env.
fund(
XRP(10000), alice, bob, carol);
914 env(
pay(alice, carol,
XRP(10)));
926 env(
pay(bob, carol,
XRP(30)));
929 auto const countTxs = [&](
AccountID const& account,
934 bool haveMarker =
false;
940 params[jss::account] =
toBase58(account);
941 params[jss::ledger_index_min] = -1;
942 params[jss::ledger_index_max] = -1;
944 if (!delegateParams.isNull())
945 params[jss::delegate] = delegateParams;
947 params[jss::limit] = *limit;
949 params[jss::marker] = marker;
951 auto const res = env.
rpc(
"json",
"account_tx",
to_string(params));
952 auto const& result = res[jss::result];
954 if (result.isMember(jss::transactions))
955 count += result[jss::transactions].size();
957 if (!limit || !result.isMember(jss::marker))
960 marker = result[jss::marker];
963 if (!BEAST_EXPECT(pages < 20))
970 auto const checkError = [&](
json::Value const& delegateParams,
973 params[jss::account] = alice.
human();
974 params[jss::delegate] = delegateParams;
975 auto res = env.
rpc(
"json",
"account_tx",
to_string(params));
976 BEAST_EXPECT(res[jss::result][jss::error] == errToken);
982 p[jss::delegate_filter] =
"actor";
983 BEAST_EXPECT(countTxs(alice.
id(), p) == 1);
989 p[jss::delegate_filter] =
"actor";
990 p[jss::counter_party] = bob.
human();
991 BEAST_EXPECT(countTxs(alice.
id(), p) == 1);
997 p[jss::delegate_filter] =
"actor";
998 p[jss::counter_party] = carol.
human();
999 BEAST_EXPECT(countTxs(alice.
id(), p) == 0);
1006 p[jss::delegate_filter] =
"authorizer";
1007 BEAST_EXPECT(countTxs(bob.
id(), p) == 1);
1013 p[jss::delegate_filter] =
"authorizer";
1014 p[jss::counter_party] = alice.
human();
1015 BEAST_EXPECT(countTxs(bob.
id(), p) == 1);
1023 p[jss::delegate_filter] =
"authorizer";
1024 BEAST_EXPECT(countTxs(alice.
id(), p) == 0);
1031 p[jss::delegate_filter] =
"authorizer";
1032 p[jss::counter_party] = carol.
human();
1033 BEAST_EXPECT(countTxs(bob.
id(), p) == 0);
1040 p[jss::delegate_filter] =
"actor";
1041 BEAST_EXPECT(countTxs(bob.
id(), p) == 0);
1047 checkError(p,
"invalidParams");
1053 checkError(p,
"invalidParams");
1059 p[jss::delegate_filter] = 123;
1060 checkError(p,
"invalidParams");
1066 p[jss::delegate_filter] =
"random_string";
1067 checkError(p,
"invalidParams");
1073 p[jss::delegate_filter] =
"actor";
1074 p[jss::counter_party] = 123;
1075 checkError(p,
"invalidParams");
1081 p[jss::delegate_filter] =
"actor";
1082 p[jss::counter_party] =
"not_an_account";
1083 checkError(p,
"actMalformed");
1091 Account const edward{
"edward"};
1092 env.
fund(
XRP(1000), daria, edward);
1094 env(
signers(alice, 2, {{daria, 1}, {edward, 1}}));
1096 env(
pay(alice, carol,
XRP(1)),
1098 Msig(daria, edward));
1104 p[jss::delegate_filter] =
"actor";
1105 BEAST_EXPECT(countTxs(alice.
id(), p) == 1);
1113 env(
pay(alice, bob,
XRP(1)));
1117 actorFilter[jss::delegate_filter] =
"actor";
1118 BEAST_EXPECT(countTxs(alice.
id(), actorFilter) == 1);
1120 BEAST_EXPECT(countTxs(alice.
id(), actorFilter, 1) == 1);
1122 actorFilter[jss::counter_party] = bob.
human();
1123 BEAST_EXPECT(countTxs(alice.
id(), actorFilter) == 1);
1124 BEAST_EXPECT(countTxs(alice.
id(), actorFilter, 1) == 1);
1127 authorizerFilter[jss::delegate_filter] =
"authorizer";
1128 BEAST_EXPECT(countTxs(bob.
id(), authorizerFilter) == 1);
1129 BEAST_EXPECT(countTxs(bob.
id(), authorizerFilter, 1) == 1);
1131 authorizerFilter[jss::counter_party] = alice.
human();
1132 BEAST_EXPECT(countTxs(bob.
id(), authorizerFilter) == 1);
1133 BEAST_EXPECT(countTxs(bob.
id(), authorizerFilter, 1) == 1);
1142 actorFilter[jss::delegate_filter] =
"actor";
1146 dp[jss::account] = alice.
human();
1147 dp[jss::ledger_index_min] = -1;
1148 dp[jss::ledger_index_max] = -1;
1149 dp[jss::delegate] = actorFilter;
1151 auto const dRes = env.
rpc(
"json",
"account_tx",
to_string(dp));
1152 BEAST_EXPECT(dRes[jss::result].isMember(jss::marker));
1153 json::Value const delegateMarker = dRes[jss::result][jss::marker];
1155 delegateMarker.
isMember(jss::delegate) && delegateMarker[jss::delegate].
asBool());
1160 p[jss::account] = alice.
human();
1161 p[jss::ledger_index_min] = -1;
1162 p[jss::ledger_index_max] = -1;
1164 p[jss::marker] = delegateMarker;
1165 auto const r = env.
rpc(
"json",
"account_tx",
to_string(p));
1166 BEAST_EXPECT(r[jss::result][jss::error] ==
"invalidParams");
1171 np[jss::account] = alice.
human();
1172 np[jss::ledger_index_min] = -1;
1173 np[jss::ledger_index_max] = -1;
1175 auto const nRes = env.
rpc(
"json",
"account_tx",
to_string(np));
1176 BEAST_EXPECT(nRes[jss::result].isMember(jss::marker));
1177 json::Value const normalMarker = nRes[jss::result][jss::marker];
1178 BEAST_EXPECT(!normalMarker.
isMember(jss::delegate));
1183 p[jss::account] = alice.
human();
1184 p[jss::ledger_index_min] = -1;
1185 p[jss::ledger_index_max] = -1;
1187 p[jss::delegate] = actorFilter;
1188 p[jss::marker] = normalMarker;
1189 auto const r = env.
rpc(
"json",
"account_tx",
to_string(p));
1190 BEAST_EXPECT(r[jss::result][jss::error] ==
"invalidParams");