Fixes 3 issues: In the following scenario, an account cannot perform NFTokenAcceptOffer even though it should be allowed to: - BROKER has < S - ALICE offers to sell token for S - BOB offers to buy token for > S - BROKER tries to bridge the two offers This currently results in `tecINSUFFICIENT_FUNDS`, but should not because BROKER is not spending any funds in this transaction, beyond the transaction fee. When trading an NFT using IOUs, and when the issuer of the IOU has any non-zero value set for TransferFee on their account via AccountSet (not a TransferFee on the NFT), and when the sale amount is equal to the total balance of that IOU that the buyer has, the resulting balance for the issuer of the IOU will become positive. This means that the buyer of the NFT was supposed to have caused a certain amount of IOU to be burned. That amount was unable to be burned because the buyer couldn't cover it. This results in the buyer owing this amount back to the issuer. In a real world scenario, this is appropriate and can be settled off-chain. Currency issuers could not make offers for NFTs using their own currency, receiving `tecINSUFFICIENT_FUNDS` if they tried to do so. With this fix, they are now able to buy/sell NFTs using their own currency.
Unit Tests
Running Tests
Unit tests are bundled in the rippled executable and can be executed using the
--unittest parameter. Without any arguments to this option, all non-manual
unit tests will be executed. If you want to run one or more manual tests, you
must specify it by suite or full-name (e.g. ripple.app.NoRippleCheckLimits or
just NoRippleCheckLimits).
More than one suite or group of suites can be specified as a comma separated
list via the argument. For example, --unittest=beast,OversizeMeta will run
all suites in the beast library (root identifier) as well as the test suite
named OversizeMeta). All name matches are case sensitive.
Tests can be executed in parallel using several child processes by specifying
the --unittest-jobs=N parameter. The default behavior is to execute serially
using a single process.
The order that suites are executed is determined by the suite priority that
is optionally specified when the suite is declared in the code with one of the
BEAST_DEFINE_TESTSUITE macros. By default, suites have a priority of 0, and
other suites can choose to declare an integer priority value to make themselves
execute before or after other suites based on their specified priority value.
By default, the framework will emit the name of each testcase/testsuite when it
starts and any messages sent to the suite log stream. The --quiet option will
suppress both types of messages, but combining --unittest-log with --quiet
will cause log messages to be emitted while suite/case names are suppressed.