TMEventDataInner

This commit is contained in:
Ethan Buchman
2017-04-28 17:57:06 -04:00
parent ac28b12fa8
commit 07e59e63f9
12 changed files with 98 additions and 64 deletions

View File

@ -4,9 +4,9 @@ import (
"time"
"github.com/pkg/errors"
"github.com/tendermint/tendermint/types"
cmn "github.com/tendermint/tmlibs/common"
events "github.com/tendermint/tmlibs/events"
"github.com/tendermint/tendermint/types"
)
// Waiter is informed of current height, decided whether to quit early
@ -77,12 +77,12 @@ func WaitForOneEvent(evsw types.EventSwitch,
select {
case <-quit:
return nil, errors.New("timed out waiting for event")
return types.TMEventData{}, errors.New("timed out waiting for event")
case evt := <-evts:
tmevt, ok := evt.(types.TMEventData)
if ok {
return tmevt, nil
}
return nil, errors.Errorf("Got unexpected event type: %#v", evt)
return types.TMEventData{}, errors.Errorf("Got unexpected event type: %#v", evt)
}
}