Skip to content

Commit

Permalink
fix(store): avoid nil error on not exhausted payload stream (#20644)
Browse files Browse the repository at this point in the history
Co-authored-by: Marko <[email protected]>
  • Loading branch information
mmsqe and tac0turtle authored Jun 12, 2024
1 parent abeb7ee commit b22269d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions store/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion store/snapshots/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion store/v2/snapshots/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit b22269d

Please sign in to comment.