Skip to content

Commit

Permalink
test: add unit test for redundant payment (#4860)
Browse files Browse the repository at this point in the history
If the payee and payer are the same account, then the transaction fails
in preflight with temREDUNDANT.
  • Loading branch information
Bronek authored Jan 31, 2024
1 parent 22cdb57 commit 90d463b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/test/app/TxQ_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,9 @@ class TxQPosNegFlows_test : public beast::unit_test::suite
// Fail in preflight
env(pay(alice, bob, XRP(-1000)), ter(temBAD_AMOUNT));

// Fail in preflight
env(pay(alice, alice, XRP(100)), ter(temREDUNDANT));

// Fail in preclaim
env(noop(alice), fee(XRP(100000)), ter(terINSUF_FEE_B));
}
Expand Down

0 comments on commit 90d463b

Please sign in to comment.