mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-14 22:01:20 +00:00
fix race
This commit is contained in:
@ -81,14 +81,12 @@ func startNewConsensusStateAndWaitForBlock(t *testing.T, lastBlockHeight int64,
|
|||||||
}
|
}
|
||||||
|
|
||||||
func sendTxs(cs *ConsensusState, ctx context.Context) {
|
func sendTxs(cs *ConsensusState, ctx context.Context) {
|
||||||
i := 0
|
|
||||||
tx := []byte{byte(i)}
|
|
||||||
for i := 0; i < 256; i++ {
|
for i := 0; i < 256; i++ {
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
return
|
return
|
||||||
default:
|
default:
|
||||||
tx[0] = byte(i)
|
tx := []byte{byte(i)}
|
||||||
cs.mempool.CheckTx(tx, nil)
|
cs.mempool.CheckTx(tx, nil)
|
||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user