mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-08 06:15:33 +00:00
fix tests
This commit is contained in:
@@ -45,10 +45,16 @@ func (is *IndexerService) OnStart() error {
|
||||
var batch *Batch
|
||||
for {
|
||||
select {
|
||||
case e := <-blockHeadersCh:
|
||||
case e, ok := <-blockHeadersCh:
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
numTxs = e.(types.EventDataNewBlockHeader).Header.NumTxs
|
||||
batch = NewBatch(numTxs)
|
||||
case e := <-txsCh:
|
||||
case e, ok := <-txsCh:
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
if batch == nil {
|
||||
panic("Expected pubsub to send block header first, but got tx event")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user