mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-22 14:50:54 +00:00
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user