- Rewrite "Asset::native()" and "integral()" to use std::visit.
- Improve documentation for the LoanPay transaction flags:
tfLoanFullPayment, tfLoanLatePayment
- Use a lambda to defensively guarantee that "tx" can not affect the
"signerCount" in "LoanSet::calculateBaseFee" # Please enter the commit
message for your changes. Lines starting
- Add some test cases to improve coverage, and exclude some lines from
coverage.
- Rounds the Broker.DebtTotal to the Vault scale any time it is
modified. This should reduce rounding errors.
- Ensure that no debt is left for the Broker after the last loan is
deleted. This ensures that any accumulated rounding errors are
resolved.
The `ledger_entry` and `deposit_preauth` requests require an array of credentials. However, the array size is not checked before is gets processing. This fix adds checks and return errors in case array size is too big.
- Shortcut on issuer match in canTransfer.
- An asset can transfer if either trustline enabled rippling, so both
must have it disabled for the transfer to fail with terNO_RIPPLE.
- Remove unnecessary asfDefaultRipple sets in unit tests.
- Add a new unit test helper class: testline, and a macro: THISLINE.
When included as a parameter to Env::operator(), will include the line
number of the transaction that didn't get the expected result. Works
similarly to BEAST_EXPECT. I didn't do the same for the file name,
because that can be deduced from the testcase name.
- Includes unit tests for terNO_RIPPLE.
- Switch auth mode to weak when submitter is destination.
- Require rippling enabled for vault deposits or withdrawals.
This PR splits `RPCHelpers.h` into two files, by moving out all the ledger-fetching-related functions into a separate file, `RPCLedgerHelpers.h`. It also moves `getAccountObjects` to `AccountObjects.h`, since it is only used in that one place.
* XRPLF/develop:
chore: Set version 3.1.0-b0 (5986)
ci: Clean workspace on Windows self-hosted runners (6024)
docs: fix spelling in comments (6002)
fix: floating point representation errors in vault (5997)
ci: Specify bash as the default shell in workflows (6021)
refactor: Add `XRPL_RETIRE_FIX` and `XRPL_RETIRE_FEATURE` macros (6014)
refactor: Retire DepositPreAuth and DepositAuth amendments (5978)
chore: Move running of unit tests out of coverage target (6018)
refactor: Retire PayChanRecipientOwnerDir amendment (5946)
Technically b0 is not a release, so no "release" prefix here. It marks the point at which we moved the preceding release (3.0.0 in this case) from Beta to Release Candidate.
This change fixes floating point errors in conversion of shares to assets and other way, used in `VaultDeposit`, `VaultWithdraw` and `VaultClawback`. In the floating point calculations the division introduces a larger error than multiplication. If we do division first, then the error introduced will be increased by the multiplication that follows, which is therefore the wrong order to perform these two operations. This change flips the order of arithmetic operations, which minimizes the error.