clean up invariant check for IOUescrow + remove (now) unwanted testcase

This commit is contained in:
Richard Holland
2023-02-07 08:43:23 +00:00
parent 0f10f3b5c0
commit 0e2e674c51
3 changed files with 9 additions and 29 deletions

View File

@@ -361,21 +361,6 @@ class Invariants_test : public beast::unit_test::suite
using namespace test::jtx;
testcase << "no zero escrow";
doInvariantCheck(
{{"Cannot return non-native STAmount as XRPAmount"}},
[](Account const& A1, Account const& A2, ApplyContext& ac) {
// escrow with nonnative amount
auto const sle = ac.view().peek(keylet::account(A1.id()));
if (!sle)
return false;
auto sleNew = std::make_shared<SLE>(
keylet::escrow(A1, (*sle)[sfSequence] + 2));
STAmount nonNative(A2["USD"](51));
sleNew->setFieldAmount(sfAmount, nonNative);
ac.view().insert(sleNew);
return true;
});
doInvariantCheck(
{{"XRP net change of -1000000 doesn't match fee 0"},
{"escrow specifies invalid amount"}},