From 6f3d9b4be3d281feac4d2495889d1584c9ed0df8 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Fri, 19 Jan 2018 01:36:52 -0500 Subject: [PATCH] fix race --- consensus/replay_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/consensus/replay_test.go b/consensus/replay_test.go index a4786dde..483bd3a7 100644 --- a/consensus/replay_test.go +++ b/consensus/replay_test.go @@ -81,14 +81,12 @@ func startNewConsensusStateAndWaitForBlock(t *testing.T, lastBlockHeight int64, } func sendTxs(cs *ConsensusState, ctx context.Context) { - i := 0 - tx := []byte{byte(i)} for i := 0; i < 256; i++ { select { case <-ctx.Done(): return default: - tx[0] = byte(i) + tx := []byte{byte(i)} cs.mempool.CheckTx(tx, nil) i++ }