diff --git a/.testnet/scenarios/entropy/hook_entropy_api.py b/.testnet/scenarios/entropy/hook_entropy_api.py index c7d68c1dc..0ba46bd90 100644 --- a/.testnet/scenarios/entropy/hook_entropy_api.py +++ b/.testnet/scenarios/entropy/hook_entropy_api.py @@ -112,8 +112,11 @@ async def scenario(ctx, log): if execution.get("HookResult") != 3: raise AssertionError(f"Hook did not ACCEPT: {execution}") - return_code = execution.get("HookReturnCode", "") - if return_code and str(return_code) != "0": + if "HookReturnCode" not in execution: + raise AssertionError(f"HookReturnCode missing from execution: {execution}") + + return_code = execution["HookReturnCode"] + if str(return_code) != "0": raise AssertionError(f"entropy_cr_* Hook check failed: {execution}") log("entropy_cr_status, entropy_cr_dice, and entropy_cr_random passed") diff --git a/src/test/app/ConsensusEntropy_test.cpp b/src/test/app/ConsensusEntropy_test.cpp index 0f263a787..6ec48a044 100644 --- a/src/test/app/ConsensusEntropy_test.cpp +++ b/src/test/app/ConsensusEntropy_test.cpp @@ -978,8 +978,7 @@ class ConsensusEntropy_test : public beast::unit_test::suite } )[test.hook]"]; - env(ripple::test::jtx::hook( - alice, {{hso(diceHook, overrideFlag)}}, 0), + env(ripple::test::jtx::hook(alice, {{hso(diceHook, overrideFlag)}}, 0), M("reject retired dice import"), HSFEE, ter(temMALFORMED)); diff --git a/src/xrpld/app/consensus/ConsensusExtensions.cpp b/src/xrpld/app/consensus/ConsensusExtensions.cpp index db703e33b..3db5880e1 100644 --- a/src/xrpld/app/consensus/ConsensusExtensions.cpp +++ b/src/xrpld/app/consensus/ConsensusExtensions.cpp @@ -1481,7 +1481,8 @@ ConsensusExtensions::selectEntropy( }; //@@end entropy-selector-fallback - // Standalone: synthetic deterministic entropy so the entropy_cr_* draws work. + // Standalone: synthetic deterministic entropy so the entropy_cr_* draws + // work. //@@start entropy-selector-standalone if (app_.config().standalone()) {