From 76c04dba83198ac29e3e80021e38c794941e5603 Mon Sep 17 00:00:00 2001 From: Paul Harris Date: Fri, 17 Jan 2025 10:36:34 +1000 Subject: [PATCH] expanded message context to contain the roots, which will make it long but useful. Signed-off-by: Paul Harris --- .../spec/datastructures/blocks/StateAndBlockSummary.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/StateAndBlockSummary.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/StateAndBlockSummary.java index 547c0931c72..a53969ec888 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/StateAndBlockSummary.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/StateAndBlockSummary.java @@ -39,8 +39,13 @@ protected StateAndBlockSummary(final BeaconBlockSummary blockSummary, final Beac // This check would allow a state to have an empty slot, and still be a valid block and state. checkArgument( latestBlockHeaderBodyRoot.equals(blockSummary.getBodyRoot()), - "Block root for the state must match the supplied state at slot " - + blockSummary.getSlot()); + String.format( + "Latest Block body root %s in state at slot %s must match the block summary root. " + + "Block slot %s, block body root %s", + latestBlockHeaderBodyRoot, + state.getSlot(), + blockSummary.getSlot(), + blockSummary.getBodyRoot())); } this.blockSummary = blockSummary; this.state = state;