mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-26 18:04:22 +00:00
event listeners take EventData, not interface{}; EventData type assertions
This commit is contained in:
+1
-1
@@ -181,7 +181,7 @@ func (c *Crawler) readLoop(node *Node) {
|
||||
}
|
||||
|
||||
func (c *Crawler) consumeMessage(eventMsg ctypes.ResultEvent, node *Node) error {
|
||||
block := eventMsg.Data.(*types.Block)
|
||||
block := eventMsg.Data.(*types.EventDataNewBlock).Block
|
||||
node.LastSeen = time.Now()
|
||||
node.BlockHeight = block.Height
|
||||
node.BlockHistory[block.Height] = node.LastSeen
|
||||
|
||||
Reference in New Issue
Block a user