Skip to content

Commit 98393be

Browse files
mergify[bot]mmsqe
andauthored
fix(test): avoid concurrent read and write on same hash in oe test (backport #22892) (#22894)
Co-authored-by: mmsqe <[email protected]>
1 parent 0a18aca commit 98393be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/v2/cometbft/abci_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -960,10 +960,10 @@ func TestOptimisticExecution(t *testing.T) {
960960
require.Equal(t, resp.Status, abciproto.PROCESS_PROPOSAL_STATUS_ACCEPT)
961961

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

0 commit comments

Comments
 (0)