Skip to content

Commit

Permalink
fix core.QueryChannelUpgradeError to return (nil,nil) if no error rec…
Browse files Browse the repository at this point in the history
…eipt found

Signed-off-by: Masanori Yoshida <[email protected]>
  • Loading branch information
siburu committed Jul 12, 2024
1 parent 1803ad8 commit f433965
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ func QueryChannelUpgradeError(ctx QueryContext, chain interface {
}, upgradeSequence uint64, prove bool) (*chantypes.QueryUpgradeErrorResponse, error) {
if chanUpgErr, err := chain.QueryChannelUpgradeError(ctx, upgradeSequence); err != nil {
return nil, err
} else if chanUpgErr == nil {
return nil, nil
} else if !prove {
return chanUpgErr, nil
} else if value, err := chain.Codec().Marshal(&chanUpgErr.ErrorReceipt); err != nil {
Expand Down

0 comments on commit f433965

Please sign in to comment.