Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 07-tendermint GetConsensusState to return a bool instead of an error #1140

Closed
3 tasks
damiannolan opened this issue Mar 17, 2022 · 0 comments
Closed
3 tasks

Comments

@damiannolan
Copy link
Member

Summary

The helper function GetConsensusState in 07-tendermint currently returns (*ConsensusState, error).
This deviates from the standard pattern of using (type, bool) as the return signature for state accessor functions used throughout ibc-go and the cosmos-sdk.

Proposal

  • Consider updating the return values of GetConsensusState to return (*ConsensusState, error)
  • Panic in the event of malformed bytes (i.e. the stored bytes cannot be unmarshalled to the desired type)

ref: PR comment


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@damiannolan damiannolan self-assigned this Mar 25, 2022
@crodriguezvega crodriguezvega added this to the 02-client refactor milestone Mar 31, 2022
CosmosCar pushed a commit to caelus-labs/ibc-go that referenced this issue Nov 6, 2023
## Overview

`celestia-openrpc v0.1.2` signature for `NewDataAvailabilityHeader` now
returns an error, so this needed to be handled.

`RandEDS` and `RandShares` needed to be updated for the new `Share`
type.

## Checklist

<!-- 
Please complete the checklist to ensure that the PR is ready to be
reviewed.

IMPORTANT:
PRs should be left in Draft until the below checklist is completed.
-->

- [x] New and updated code has appropriate documentation
- [x] New and updated code has new and/or updated testing
- [x] Required CI checks are passing
- [x] Visual proof for any user facing features like CLI or
documentation updates
- [x] Linked issues closed with keywords

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done 🥳
Development

No branches or pull requests

2 participants