diff --git a/core/verkle_witness_test.go b/core/verkle_witness_test.go index ca0c928c3c..d1cca1cecc 100644 --- a/core/verkle_witness_test.go +++ b/core/verkle_witness_test.go @@ -247,7 +247,7 @@ func TestProcessParentBlockHash(t *testing.T) { } // Read block hashes for block 0 .. num-1 for i := 0; i < num; i++ { - have, want := getContractStoredBlockHash(statedb, uint64(i), isVerkle), common.Hash{byte(i + 1)} + have, want := getContractStoredBlockHash(statedb, uint64(i)), common.Hash{byte(i + 1)} if have != want { t.Errorf("block %d, verkle=%v, have parent hash %v, want %v", i, isVerkle, have, want) } @@ -268,13 +268,10 @@ func TestProcessParentBlockHash(t *testing.T) { } // getContractStoredBlockHash is a utility method which reads the stored parent blockhash for block 'number' -func getContractStoredBlockHash(statedb *state.StateDB, number uint64, isVerkle bool) common.Hash { +func getContractStoredBlockHash(statedb *state.StateDB, number uint64) common.Hash { ringIndex := number % params.HistoryServeWindow var key common.Hash binary.BigEndian.PutUint64(key[24:], ringIndex) - if isVerkle { - return statedb.GetState(params.HistoryStorageAddress, key) - } return statedb.GetState(params.HistoryStorageAddress, key) }