neoneo-go/pkg/pubsub/event.go
2019-02-25 22:44:14 +00:00

14 lines
428 B
Go

package pubsub
type EventType int
const (
NewBlock EventType = iota // When blockchain connects a new block, it will emit an NewBlock Event
BadBlock // When blockchain declines a block, it will emit a new block event
BadHeader // When blockchain rejects a Header, it will emit this event
)
type Event struct {
Type EventType // E.g. event.NewBlock
data []byte // Raw information
}