Browse Source

fix race

pull/426/head
Ethan Buchman 8 years ago
parent
commit
2037d2631a
2 changed files with 6 additions and 9 deletions
  1. +5
    -8
      consensus/mempool_test.go
  2. +1
    -1
      glide.lock

+ 5
- 8
consensus/mempool_test.go View File

@ -81,15 +81,12 @@ func TestRmBadTx(t *testing.T) {
// check for the tx
for {
time.Sleep(time.Second)
select {
case <-ch:
default:
txs := cs.mempool.Reap(1)
if len(txs) == 0 {
ch <- struct{}{}
}
txs := cs.mempool.Reap(1)
if len(txs) == 0 {
ch <- struct{}{}
return
}
}
}()


+ 1
- 1
glide.lock View File

@ -79,7 +79,7 @@ imports:
- name: github.com/tendermint/go-clist
version: 3baa390bbaf7634251c42ad69a8682e7e3990552
- name: github.com/tendermint/go-common
version: 6141dc6eedab067f7e25707a237218ef2c0dc273
version: dcb015dff6c7af21e65c8e2f3b450df19d38c777
subpackages:
- test
- name: github.com/tendermint/go-config


Loading…
Cancel
Save