Skip to content

Commit

Permalink
go/tendermint/keymanager: error Status() if keymanager doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrus committed Jan 31, 2020
1 parent b3ee039 commit 06d2b27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .changelog/2628.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
go/tendermint/keymanager: error in Status() if keymanager doesn't exist

This fixes panics in the key-manager client if keymanager for the specific
runtime doesn't exist.
2 changes: 1 addition & 1 deletion go/consensus/tendermint/apps/keymanager/state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (st *ImmutableState) getStatusesRaw() ([][]byte, error) {
func (st *ImmutableState) Status(id common.Namespace) (*api.Status, error) {
_, raw := st.Snapshot.Get(statusKeyFmt.Encode(&id))
if raw == nil {
return nil, nil
return nil, api.ErrNoSuchKeyManager
}

var status api.Status
Expand Down

0 comments on commit 06d2b27

Please sign in to comment.