types: do not ignore errors returned by PublishWithEvents (#3722)

Follow up to #3643

* update changelog

* do not ignore errors returned by PublishWithEvents
This commit is contained in:
Anton Kaliaev
2019-06-12 15:25:47 +02:00
committed by GitHub
parent ab0835463f
commit 9010ff5f96
2 changed files with 19 additions and 23 deletions
+2 -4
View File
@@ -130,8 +130,7 @@ func (b *EventBus) PublishEventNewBlock(data EventDataNewBlock) error {
// add predefined new block event
events[EventTypeKey] = append(events[EventTypeKey], EventNewBlock)
_ = b.pubsub.PublishWithEvents(ctx, data, events)
return nil
return b.pubsub.PublishWithEvents(ctx, data, events)
}
func (b *EventBus) PublishEventNewBlockHeader(data EventDataNewBlockHeader) error {
@@ -170,8 +169,7 @@ func (b *EventBus) PublishEventTx(data EventDataTx) error {
events[TxHashKey] = append(events[TxHashKey], fmt.Sprintf("%X", data.Tx.Hash()))
events[TxHeightKey] = append(events[TxHeightKey], fmt.Sprintf("%d", data.Height))
_ = b.pubsub.PublishWithEvents(ctx, data, events)
return nil
return b.pubsub.PublishWithEvents(ctx, data, events)
}
func (b *EventBus) PublishEventNewRoundStep(data EventDataRoundState) error {