Skip to content

Commit

Permalink
Fix TransactionEntry_test
Browse files Browse the repository at this point in the history
  • Loading branch information
Bronek committed Nov 8, 2023
1 parent 55ec511 commit 9865328
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions src/test/rpc/TransactionEntry_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,22 +230,20 @@ class TransactionEntry_test : public beast::unit_test::suite
}

// Use the command line form with the index.
if (apiVersion == RPC::apiMaximumSupportedVersion)
{
Json::Value const clIndex{env.rpc(
"transaction_entry", txhash, std::to_string(index))};
BEAST_EXPECT(clIndex["result"] == resIndex);
}
Json::Value const clIndex{env.rpc(
apiVersion,
"transaction_entry",
txhash,
std::to_string(index))};
BEAST_EXPECT(clIndex["result"] == resIndex);

// Use the command line form with the ledger_hash.
if (apiVersion == RPC::apiMaximumSupportedVersion)
{
Json::Value const clHash{env.rpc(
"transaction_entry",
txhash,
resIndex[jss::ledger_hash].asString())};
BEAST_EXPECT(clHash["result"] == resIndex);
}
Json::Value const clHash{env.rpc(
apiVersion,
"transaction_entry",
txhash,
resIndex[jss::ledger_hash].asString())};
BEAST_EXPECT(clHash["result"] == resIndex);
};

Account A1{"A1"};
Expand Down

0 comments on commit 9865328

Please sign in to comment.