Browse Source

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

Follow up to #3643

* update changelog

* do not ignore errors returned by PublishWithEvents
pull/3728/head
Anton Kaliaev 5 years ago
committed by GitHub
parent
commit
9010ff5f96
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 23 deletions
  1. +17
    -19
      CHANGELOG_PENDING.md
  2. +2
    -4
      types/event_bus.go

+ 17
- 19
CHANGELOG_PENDING.md View File

@ -4,26 +4,25 @@
### BREAKING CHANGES:
- \#3613 Switch from golang/dep to Go 1.11 Modules to resolve dependencies:
- it is recommended to switch to Go Modules if your project has tendermint
as a dependency
- read more on Modules here: https://github.com/golang/go/wiki/Modules
* CLI/RPC/Config
* [rpc] \#3616 Improve `/block_results` response format (`results.DeliverTx` ->
`results.deliver_tx`). See docs for details.
- [cli] \#3613 Switch from golang/dep to Go Modules to resolve dependencies:
It is recommended to switch to Go Modules if your project has tendermint as
a dependency. Read more on Modules here:
https://github.com/golang/go/wiki/Modules
- [rpc] \#3616 Improve `/block_results` response format (`results.DeliverTx`
-> `results.deliver_tx`). See docs for details.
* Apps
* [abci] \#1859 `ResponseCheckTx`, `ResponseDeliverTx`, `ResponseBeginBlock`,
and `ResponseEndBlock` now include `Events` instead of `Tags`. Each `Event`
contains a `type` and a list of `attributes` (list of key-value pairs) allowing
for inclusion of multiple distinct events in each response.
- [abci] \#1859 `ResponseCheckTx`, `ResponseDeliverTx`, `ResponseBeginBlock`,
and `ResponseEndBlock` now include `Events` instead of `Tags`. Each `Event`
contains a `type` and a list of `attributes` (list of key-value pairs)
allowing for inclusion of multiple distinct events in each response.
* Go API
* [libs/db] Removed deprecated `LevelDBBackend` const
* If you have `db_backend` set to `leveldb` in your config file, please
- [libs/db] [\#3632](https://github.com/tendermint/tendermint/pull/3632) Removed deprecated `LevelDBBackend` const
If you have `db_backend` set to `leveldb` in your config file, please
change it to `goleveldb` or `cleveldb`.
- [p2p] \#3521 Remove NewNetAddressStringWithOptionalID
- [p2p] \#3521 Remove NewNetAddressStringWithOptionalID
* Blockchain Protocol
@ -32,10 +31,9 @@
### FEATURES:
### IMPROVEMENTS:
- [p2p] \#3666 Add per channel telemtry to improve reactor observability
* [rpc] [\#3686](https://github.com/tendermint/tendermint/pull/3686) `HTTPClient#Call` returns wrapped errors, so a caller could use `errors.Cause` to retrieve an error code.
- [p2p] \#3666 Add per channel telemetry to improve reactor observability
- [rpc] [\#3686](https://github.com/tendermint/tendermint/pull/3686) `HTTPClient#Call` returns wrapped errors, so a caller could use `errors.Cause` to retrieve an error code. (@wooparadog)
### BUG FIXES:
- [libs/db] Fixed the BoltDB backend's Batch.Delete implementation (@Yawning)
- [libs/db] Fixed the BoltDB backend's Get and Iterator implementation (@Yawning)
- [libs/db] \#3717 Fixed the BoltDB backend's Batch.Delete implementation (@Yawning)
- [libs/db] \#3718 Fixed the BoltDB backend's Get and Iterator implementation (@Yawning)

+ 2
- 4
types/event_bus.go 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 {


Loading…
Cancel
Save