mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-29 01:50:43 +00:00
Merge remote-tracking branch 'ripple/develop' into xrplf/sponsor
This commit is contained in:
@@ -914,6 +914,25 @@ class NFTokenBaseUtil_test : public beast::unit_test::Suite
|
||||
BEAST_EXPECT(ownerCount(env, buyer) == 1);
|
||||
}
|
||||
|
||||
// Only test this with fixCleanup3_2_0 enabled. Without the fix,
|
||||
// an assert-enabled build can crash when Ledger::read() receives
|
||||
// a zero-key offer ID.
|
||||
if (features[fixCleanup3_2_0])
|
||||
{
|
||||
// Zero is not a valid offer ID.
|
||||
env(token::cancelOffer(buyer, {uint256{}}), Ter(temMALFORMED));
|
||||
env.close();
|
||||
BEAST_EXPECT(ownerCount(env, buyer) == 1);
|
||||
|
||||
// List of offer IDs containing zero is invalid.
|
||||
// craftedIndex is not a valid offer index but it is not zero.
|
||||
auto const craftedIndex = keylet::nftoffer(gw, env.seq(gw)).key;
|
||||
env(token::cancelOffer(buyer, {buyerOfferIndex, uint256{}, craftedIndex}),
|
||||
Ter(temMALFORMED));
|
||||
env.close();
|
||||
BEAST_EXPECT(ownerCount(env, buyer) == 1);
|
||||
}
|
||||
|
||||
// List of tokens to delete is too long.
|
||||
{
|
||||
std::vector<uint256> const offers(kMaxTokenOfferCancelCount + 1, buyerOfferIndex);
|
||||
|
||||
Reference in New Issue
Block a user