Conversation
|
|
||
| if (sle->getFieldU64(sfOutstandingAmount) + saAmount.value() > | ||
| (*sle)[~sfMaximumAmount].value_or(maxMPTokenAmount)) | ||
| return tecMPT_MAX_AMOUNT_EXCEEDED; |
There was a problem hiding this comment.
Should add a unit-test for this.
There was a problem hiding this comment.
we already have existing unit tests that tests if the issuer issues out more than the max. the unit test i added covered the scenario reproduced in QA that currently exhibits the wrong behavior
There was a problem hiding this comment.
Isn't this a different execution path?
There was a problem hiding this comment.
All the existing test cases hit this new if-check in rippleSend. The problem found is that during holder to holder payment, rippleCredit is called twice from 1) holder to issuer and then 2)issuer to holder. The current problem is that in the second rippleCredit call from issuer to holder, the code think the issuer is trying to issue more than the MaximumAmount. This is why I moved the check in the rippleCredit to its caller rippleSend.
High Level Overview of Change
Context of Change
Type of Change
.gitignore, formatting, dropping support for older tooling)API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)