Skip to content

Commit 27320cb

Browse files
mergify[bot]MSalopektac0turtle
authored
fix: pass FinalizeBlock request and response to ABCIListener (backport #18486) (#18493)
Co-authored-by: MSalopek <matija.salopek994@gmail.com> Co-authored-by: marbar3778 <marbar3778@yahoo.com>
1 parent d367589 commit 27320cb

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ Ref: https://keepachangelog.com/en/1.0.0/
4949
* (x/gov) [#18025](https://github.com/cosmos/cosmos-sdk/pull/18025) Improve `<appd> q gov proposer` by querying directly a proposal instead of tx events. It is an alias of `q gov proposal` as the proposer is a field of the proposal.
5050
* (version) [#18063](https://github.com/cosmos/cosmos-sdk/pull/18063) Allow to define extra info to be displayed in `<appd> version --long` command.
5151

52+
### Bug Fixes
53+
54+
* (baseapp) [#18486](https://github.com/cosmos/cosmos-sdk/pull/18486) Fixed FinalizeBlock calls not being passed to ABCIListeners
55+
5256
## [v0.50.1](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.1) - 2023-11-07
5357

5458
> v0.50.0 has been retracted due to a mistake in tagging the release. Please use v0.50.1 instead.

baseapp/abci.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,14 @@ func (app *BaseApp) FinalizeBlock(req *abci.RequestFinalizeBlock) (*abci.Respons
872872
if res != nil {
873873
res.AppHash = app.workingHash()
874874
}
875+
876+
// call the streaming service hooks with the FinalizeBlock messages
877+
for _, streamingListener := range app.streamingManager.ABCIListeners {
878+
if err := streamingListener.ListenFinalizeBlock(app.finalizeBlockState.ctx, *req, *res); err != nil {
879+
app.logger.Error("ListenFinalizeBlock listening hook failed", "height", req.Height, "err", err)
880+
}
881+
}
882+
875883
return res, err
876884
}
877885

0 commit comments

Comments
 (0)