From 2a20df7b9f0a04bd0eb5f60dd5f6cf642ded9966 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 16 Dec 2024 20:45:42 +0800 Subject: [PATCH] fix(test): avoid concurrent read and write on same hash in oe test updates https://github.com/cosmos/cosmos-sdk/issues/22891 --- 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 b35c71a7c240..780e50b5027d 100644 --- a/server/v2/cometbft/abci_test.go +++ b/server/v2/cometbft/abci_test.go @@ -959,10 +959,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, }