fix(test): avoid concurrent read and write on same hash in oe test (backport #22892) (#22894)

Co-authored-by: mmsqe <mavis@crypto.com>
This commit is contained in:
mergify[bot] 2024-12-16 15:00:01 +01:00 committed by GitHub
parent 0a18aca8b1
commit 98393bea6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,
}