mirror of
https://github.com/Xahau/xahaud.git
synced 2026-07-29 01:50:13 +00:00
test(entropy): harden API scenario and formatting
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user