From b1fc3b7c419f84b8ec286a1c0d9a419381e233ef Mon Sep 17 00:00:00 2001 From: Bronek Kozicki Date: Thu, 20 Mar 2025 10:50:50 +0000 Subject: [PATCH] Do not fail VaultSet if nothing changed One of the failure conditions for VaultSet is: * The transaction does not specify any of the modifiable fields. This section was added because I've misread the specification as: "The transaction does not modify any of the modifiable fields." Turns out I was wrong, should have read more carefully. --- src/xrpld/app/tx/detail/VaultSet.cpp | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/xrpld/app/tx/detail/VaultSet.cpp b/src/xrpld/app/tx/detail/VaultSet.cpp index ce618a1eb2..9419fe0902 100644 --- a/src/xrpld/app/tx/detail/VaultSet.cpp +++ b/src/xrpld/app/tx/detail/VaultSet.cpp @@ -88,22 +88,7 @@ VaultSet::preclaim(PreclaimContext const& ctx) if (!sleIssuance) return tefINTERNAL; - auto const domain = ctx.tx[~sfDomainID]; - auto const oldDomain = sleIssuance->at(~sfDomainID); - auto const data = ctx.tx[~sfData]; - auto const oldData = vault->at(~sfData); - auto const assetMax = ctx.tx[~sfAssetMaximum]; - auto const oldAssetMax = vault->at(sfAssetMaximum); - int const changes = // - (domain && (domain != oldDomain)) + // - (data && (data != oldData)) + // - (assetMax && (*assetMax != oldAssetMax)); - - // This transaction would change nothing - if (!changes) - return tecNO_PERMISSION; - - if (domain) + if (auto const domain = ctx.tx[~sfDomainID]) { // We can only set domain if private flag was originally set if ((vault->getFlags() & tfVaultPrivate) == 0)