fix(types/mempool): fix slice init length (backport #21494) (#21519)

Co-authored-by: dropbigfish <fillfish@foxmail.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
mergify[bot] 2024-09-03 14:25:20 +00:00 committed by GitHub
parent 1ca62cb9d0
commit 11039b7932
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -48,6 +48,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Bug Fixes
* (types/mempool) [#21494](https://github.com/cosmos/cosmos-sdk/pull/21494) `GetSigners` function in priority nonce mempool returns an slide of the correct length.
* (x/consensus) [#21493](https://github.com/cosmos/cosmos-sdk/pull/21493) Fix regression that prevented to upgrade to > v0.50.7 without consensus version params.
* (baseapp) [#21256](https://github.com/cosmos/cosmos-sdk/pull/21256) Halt height will not commit the block indicated, meaning that if halt-height is set to 10, only blocks until 9 (included) will be committed. This is to go back to the original behavior before a change was introduced in v0.50.0.
* (baseapp) [#21444](https://github.com/cosmos/cosmos-sdk/pull/21444) Follow-up, Return PreBlocker events in FinalizeBlockResponse.

View File

@ -72,7 +72,7 @@ func (a signerExtractionAdapter) GetSigners(tx sdk.Tx) ([]mempool.SignerData, er
if err != nil {
return nil, err
}
signerData := make([]mempool.SignerData, len(sigs))
signerData := make([]mempool.SignerData, 0, len(sigs))
for _, sig := range sigs {
signerData = append(signerData, mempool.SignerData{
Signer: sig.PubKey.Address().Bytes(),