From 98393bea6bbdadbda505edfbbde9f30b7eb661be Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:00:01 +0100 Subject: [PATCH] fix(test): avoid concurrent read and write on same hash in oe test (backport #22892) (#22894) Co-authored-by: mmsqe --- server/v2/cometbft/abci_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/v2/cometbft/abci_test.go b/server/v2/cometbft/abci_test.go index 88f707b417..35dcdc7824 100644 --- a/server/v2/cometbft/abci_test.go +++ b/server/v2/cometbft/abci_test.go @@ -960,10 +960,10 @@ func TestOptimisticExecution(t *testing.T) { require.Equal(t, resp.Status, abciproto.PROCESS_PROPOSAL_STATUS_ACCEPT) // Initialize FinalizeBlock with correct hash - should use optimistic result - theHash = sha256.Sum256([]byte("test")) + theHash2 := sha256.Sum256([]byte("test")) fbReq := &abciproto.FinalizeBlockRequest{ Height: 2, - Hash: theHash[:], + Hash: theHash2[:], Time: ppReq.Time, Txs: ppReq.Txs, }