From 92db86b103ff6ddf1d4051820a611540df30eded Mon Sep 17 00:00:00 2001 From: yinyiqian1 Date: Sat, 10 May 2025 10:36:11 -0400 Subject: [PATCH] fix: enable LedgerStateFix for delegation (#5427) --- include/xrpl/protocol/detail/transactions.macro | 2 +- src/test/app/Delegate_test.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/xrpl/protocol/detail/transactions.macro b/include/xrpl/protocol/detail/transactions.macro index e1642b48a..605d60166 100644 --- a/include/xrpl/protocol/detail/transactions.macro +++ b/include/xrpl/protocol/detail/transactions.macro @@ -431,7 +431,7 @@ TRANSACTION(ttORACLE_DELETE, 61, OracleDelete, Delegation::delegatable, ({ })) /** This transaction type fixes a problem in the ledger state */ -TRANSACTION(ttLEDGER_STATE_FIX, 62, LedgerStateFix, Delegation::notDelegatable, ({ +TRANSACTION(ttLEDGER_STATE_FIX, 62, LedgerStateFix, Delegation::delegatable, ({ {sfLedgerFixType, soeREQUIRED}, {sfOwner, soeOPTIONAL}, })) diff --git a/src/test/app/Delegate_test.cpp b/src/test/app/Delegate_test.cpp index 77860366e..b9cc16182 100644 --- a/src/test/app/Delegate_test.cpp +++ b/src/test/app/Delegate_test.cpp @@ -215,9 +215,7 @@ class Delegate_test : public beast::unit_test::suite ter(terNO_ACCOUNT)); } - // for security reasons, AccountSet, SetRegularKey, SignerListSet, - // AccountDelete, DelegateSet are prohibited to be delegated to - // other accounts. + // non-delegatable transaction { env(delegate::set(gw, alice, {"SetRegularKey"}), ter(tecNO_PERMISSION)); @@ -229,6 +227,10 @@ class Delegate_test : public beast::unit_test::suite ter(tecNO_PERMISSION)); env(delegate::set(gw, alice, {"SetRegularKey"}), ter(tecNO_PERMISSION)); + env(delegate::set(gw, alice, {"EnableAmendment"}), + ter(tecNO_PERMISSION)); + env(delegate::set(gw, alice, {"UNLModify"}), ter(tecNO_PERMISSION)); + env(delegate::set(gw, alice, {"SetFee"}), ter(tecNO_PERMISSION)); } }