fix: Correct hybrid offer deletion on credential expiry (#6843)

Co-authored-by: Bart <bthomee@users.noreply.github.com>
This commit is contained in:
Zhiyuan Wang
2026-06-10 16:42:41 -04:00
committed by GitHub
parent 2f6b466feb
commit 09c36d066e
3 changed files with 475 additions and 336 deletions

View File

@@ -15,6 +15,7 @@
// Add new amendments to the top of this list.
// Keep it sorted in reverse chronological order.
XRPL_FIX (Cleanup3_3_0, Supported::Yes, VoteBehavior::DefaultNo)
XRPL_FIX (Cleanup3_2_0, Supported::Yes, VoteBehavior::DefaultNo)
XRPL_FEATURE(MPTokensV2, Supported::No, VoteBehavior::DefaultNo)
XRPL_FIX (Cleanup3_1_3, Supported::Yes, VoteBehavior::DefaultYes)

View File

@@ -17,6 +17,7 @@
#include <xrpl/protocol/Asset.h>
#include <xrpl/protocol/Book.h>
#include <xrpl/protocol/Concepts.h>
#include <xrpl/protocol/Feature.h>
#include <xrpl/protocol/IOUAmount.h>
#include <xrpl/protocol/Indexes.h>
#include <xrpl/protocol/MPTAmount.h>
@@ -249,7 +250,13 @@ TOfferStreamBase<TIn, TOut>::step()
continue;
}
if (entry->isFieldPresent(sfDomainID) &&
// Pre-fixCleanup3_3_0: validate domain membership for any book.
// Post-fixCleanup3_3_0: only validate when walking a domain book.
// Hybrid offers carry sfDomainID but also participate in the open
// book; expiry of the owner's domain credential should not evict
// the offer from the open book.
if ((!view_.rules().enabled(fixCleanup3_3_0) || book_.domain.has_value()) &&
entry->isFieldPresent(sfDomainID) &&
!permissioned_dex::offerInDomain(
view_, entry->key(), entry->getFieldH256(sfDomainID), j_))
{

File diff suppressed because it is too large Load Diff