diff --git a/CHANGELOG.md b/CHANGELOG.md index d40ea9c8b2..6d3c2afd5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ### Bug fixes * [#1918](https://github.com/crypto-org-chain/cronos/pull/1918) Chore: cleanup and improve x/mint params validation and test in cosmos-sdk +* [#1923](https://github.com/crypto-org-chain/cronos/pull/1911) Fix: LastBlockList should be set at the end *Nov 30, 2025* diff --git a/app/app.go b/app/app.go index c5387bbacf..379abbd1ba 100644 --- a/app/app.go +++ b/app/app.go @@ -1157,6 +1157,7 @@ func (app *App) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) { rsp, err := app.ModuleManager.EndBlock(ctx) if err := app.RefreshBlockList(ctx); err != nil { app.Logger().Error("failed to update blocklist", "error", err) + return rsp, err } return rsp, err } diff --git a/app/proposal.go b/app/proposal.go index d2dce5a32d..c0012a0cb3 100644 --- a/app/proposal.go +++ b/app/proposal.go @@ -101,8 +101,6 @@ func (h *ProposalHandler) SetBlockList(blob []byte) error { if bytes.Equal(h.lastBlockList, blob) { return nil } - h.lastBlockList = make([]byte, len(blob)) - copy(h.lastBlockList, blob) if len(blob) == 0 { h.blocklist = make(map[string]struct{}) @@ -139,6 +137,9 @@ func (h *ProposalHandler) SetBlockList(blob []byte) error { } h.blocklist = m + h.lastBlockList = make([]byte, len(blob)) + copy(h.lastBlockList, blob) + return nil }