From 218afc6054c0b76549531c4aad26d539b5db3c20 Mon Sep 17 00:00:00 2001 From: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Date: Sat, 3 Feb 2024 09:16:29 +0100 Subject: [PATCH] test: check current and new values in state processor witness --- core/state_processor_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/state_processor_test.go b/core/state_processor_test.go index e152338ac6e3..7317bb01217f 100644 --- a/core/state_processor_test.go +++ b/core/state_processor_test.go @@ -661,6 +661,13 @@ func TestProcessVerkleInvalidContractCreation(t *testing.T) { if stemStateDiff.SuffixDiffs[0].Suffix != 64 { t.Fatalf("invalid suffix diff value found for BLOCKHASH contract: %d != 64", stemStateDiff.SuffixDiffs[0].Suffix) } + // check that the "current value" is nil and that the new value isn't. + if stemStateDiff.SuffixDiffs[0].CurrentValue != nil { + t.Fatalf("non-nil current value in BLOCKHASH contract insert: %x", stemStateDiff.SuffixDiffs[0].CurrentValue) + } + if stemStateDiff.SuffixDiffs[0].NewValue == nil { + t.Fatalf("nil new value in BLOCKHASH contract insert") + } } else { for _, suffixDiff := range stemStateDiff.SuffixDiffs { if suffixDiff.Suffix > 4 {