fix(store): avoid nil error on not exhausted payload stream (#20644)

Co-authored-by: Marko <marko@baricevic.me>
This commit is contained in:
mmsqe 2024-06-13 01:48:08 +08:00 committed by GitHub
parent abeb7eee3b
commit b22269dde1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

View File

@ -28,6 +28,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Bug Fixes
* (store) [#20425](https://github.com/cosmos/cosmos-sdk/pull/20425) Fix nil pointer panic when query historical state where a new store don't exist.
* (store) [#20644](https://github.com/cosmos/cosmos-sdk/pull/20644) Avoid nil error on not exhausted payload stream.
## v1.1.0 (March 20, 2024)

View File

@ -390,7 +390,7 @@ func (m *Manager) doRestoreSnapshot(snapshot types.Snapshot, chChunks <-chan io.
}
if nextItem.GetExtensionPayload() != nil {
return errorsmod.Wrapf(err, "extension %s don't exhausted payload stream", metadata.Name)
return fmt.Errorf("extension %s don't exhausted payload stream", metadata.Name)
}
}
return nil

View File

@ -438,7 +438,7 @@ func (m *Manager) doRestoreSnapshot(snapshot types.Snapshot, chChunks <-chan io.
}
if nextItem.GetExtensionPayload() != nil {
return errorsmod.Wrapf(err, "extension %s don't exhausted payload stream", metadata.Name)
return fmt.Errorf("extension %s don't exhausted payload stream", metadata.Name)
}
}