Skip to content

Commit c263939

Browse files
authored
fix(test): avoid concurrent read and write on same hash in oe test (#22892)
1 parent 234cdc4 commit c263939

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/v2/cometbft/abci_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -959,10 +959,10 @@ func TestOptimisticExecution(t *testing.T) {
959959
require.Equal(t, resp.Status, abciproto.PROCESS_PROPOSAL_STATUS_ACCEPT)
960960

961961
// Initialize FinalizeBlock with correct hash - should use optimistic result
962-
theHash = sha256.Sum256([]byte("test"))
962+
theHash2 := sha256.Sum256([]byte("test"))
963963
fbReq := &abciproto.FinalizeBlockRequest{
964964
Height: 2,
965-
Hash: theHash[:],
965+
Hash: theHash2[:],
966966
Time: ppReq.Time,
967967
Txs: ppReq.Txs,
968968
}

0 commit comments

Comments
 (0)