Skip to content

Commit

Permalink
Merge PR #5618: Add test of missing verifier in cli context
Browse files Browse the repository at this point in the history
  • Loading branch information
antho1404 authored Feb 6, 2020
1 parent a7f25ad commit b0c6c75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ balances or a single balance by denom when the `denom` query parameter is presen
### Bug Fixes

* (x/bank) [\#5531](https://github.com/cosmos/cosmos-sdk/issues/5531) Added missing amount event to MsgMultiSend, emitted for each output.
* (client) [\#5618](https://github.com/cosmos/cosmos-sdk/pull/5618) Fix crash on the client when the verifier is not set.

### State Machine Breaking

Expand Down
3 changes: 3 additions & 0 deletions client/context/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ func (ctx CLIContext) query(path string, key tmbytes.HexBytes) ([]byte, int64, e

// Verify verifies the consensus proof at given height.
func (ctx CLIContext) Verify(height int64) (tmtypes.SignedHeader, error) {
if ctx.Verifier == nil {
return tmtypes.SignedHeader{}, fmt.Errorf("missing valid certifier to verify data from distrusted node")
}
check, err := tmliteProxy.GetCertifiedCommit(height, ctx.Client, ctx.Verifier)
switch {
case tmliteErr.IsErrCommitNotFound(err):
Expand Down

0 comments on commit b0c6c75

Please sign in to comment.