From 4aac190a6abf9c56d10c11b1ec2d06d40191f8e7 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Thu, 31 Oct 2024 14:25:18 -0400 Subject: [PATCH] [FOLD] Make use of the deep freeze flags malformed prior to accepting the amendment. --- src/xrpld/app/tx/detail/SetTrust.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/xrpld/app/tx/detail/SetTrust.cpp b/src/xrpld/app/tx/detail/SetTrust.cpp index 9421990f5e0..5ea86e88d79 100644 --- a/src/xrpld/app/tx/detail/SetTrust.cpp +++ b/src/xrpld/app/tx/detail/SetTrust.cpp @@ -429,11 +429,17 @@ SetTrust::doApply() if (bSetDeepFreeze && !bClearDeepFreeze && (willSetFreeze || alreadyFrozen)) { - uFlagsOut |= (bHigh ? lsfHighDeepFreeze : lsfLowDeepFreeze); + if (ctx_.view().rules().enabled(featureDeepFreeze)) + uFlagsOut |= (bHigh ? lsfHighDeepFreeze : lsfLowDeepFreeze); + else + return temMALFORMED; } else if (bClearDeepFreeze && !bSetDeepFreeze) { - uFlagsOut &= ~(bHigh ? lsfHighDeepFreeze : lsfLowDeepFreeze); + if (ctx_.view().rules().enabled(featureDeepFreeze)) + uFlagsOut &= ~(bHigh ? lsfHighDeepFreeze : lsfLowDeepFreeze); + else + return temMALFORMED; } if (QUALITY_ONE == uLowQualityOut)