event listeners take EventData, not interface{}; EventData type assertions

This commit is contained in:
Jae Kwon
2015-08-11 12:46:33 -07:00
parent b37ff75f7a
commit ffcc657be6
16 changed files with 62 additions and 73 deletions

View File

@ -1055,7 +1055,7 @@ func execTxWaitEvent(t *testing.T, blockCache *BlockCache, tx types.Tx, eventid
evsw := events.NewEventSwitch()
evsw.Start()
ch := make(chan interface{})
evsw.AddListenerForEvent("test", eventid, func(msg interface{}) {
evsw.AddListenerForEvent("test", eventid, func(msg types.EventData) {
ch <- msg
})
evc := events.NewEventCache(evsw)