From e6bdd5580381e66f53cd30de16250ee032cc82b2 Mon Sep 17 00:00:00 2001 From: tequ Date: Mon, 28 Sep 2026 10:48:05 +0900 Subject: [PATCH] Merge fixHookExitOutOfBounds into fix20261001 (#836) --- include/xrpl/hook/Macro.h | 4 ++-- include/xrpl/protocol/detail/features.macro | 1 - src/test/app/SetHook_test.cpp | 4 +--- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/include/xrpl/hook/Macro.h b/include/xrpl/hook/Macro.h index 16bfa628a..32872bab9 100644 --- a/include/xrpl/hook/Macro.h +++ b/include/xrpl/hook/Macro.h @@ -244,9 +244,9 @@ << "Tried to accept/rollback but specified " \ "memory outside of the wasm instance " \ << "limit when specifying a reason string"; \ - if (!view.rules().enabled(fixHookExitOutOfBounds)) \ + if (!view.rules().enabled(fix20261001)) \ return OUT_OF_BOUNDS; \ - /* fixHookExitOutOfBounds: terminate as a rollback so the \ + /* fix20261001: terminate as a rollback so the \ failure is visible in HookExecution metadata */ \ hookCtx.result.exitType = hook_api::ExitType::ROLLBACK; \ hookCtx.result.exitCode = (int64_t)OUT_OF_BOUNDS; \ diff --git a/include/xrpl/protocol/detail/features.macro b/include/xrpl/protocol/detail/features.macro index ff4833280..c55128746 100644 --- a/include/xrpl/protocol/detail/features.macro +++ b/include/xrpl/protocol/detail/features.macro @@ -36,7 +36,6 @@ XRPL_FIX (20261001, Supported::yes, VoteBehavior::DefaultYes) XRPL_FIX (HookNameValidation, Supported::yes, VoteBehavior::DefaultYes) -XRPL_FIX (HookExitOutOfBounds, Supported::yes, VoteBehavior::DefaultNo) XRPL_FEATURE(HookOnV2_1, Supported::yes, VoteBehavior::DefaultNo) XRPL_FEATURE(OnChainManifests, Supported::yes, VoteBehavior::DefaultNo) XRPL_FIX (HookMap, Supported::yes, VoteBehavior::DefaultYes) diff --git a/src/test/app/SetHook_test.cpp b/src/test/app/SetHook_test.cpp index b782eee4e..74c0db29a 100644 --- a/src/test/app/SetHook_test.cpp +++ b/src/test/app/SetHook_test.cpp @@ -3526,9 +3526,7 @@ public: { for (auto const& hook_wasm : {accept_oob_wasm, rollback_oob_wasm}) { - Env env{ - *this, - withFix ? features : features - fixHookExitOutOfBounds}; + Env env{*this, withFix ? features : features - fix20261001}; auto const alice = Account{"alice"}; auto const bob = Account{"bob"};