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

bugfix/handle empty response #18

Merged
merged 6 commits into from
Feb 19, 2024
Merged

Conversation

Sledro
Copy link
Member

@Sledro Sledro commented Feb 18, 2024

  • Prevent panic in case where RPC returns an empty body: panic: interface conversion: interface {} is nil, not map[string]interface {}
  • Add new CLI commands to readme

Copy link
Collaborator

@CryptoKass CryptoKass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. There is only one very mild issue, so it is still safe to merge as is, but:

RE: cli/cmd/defender_defendda.go
Its possible for DefendDA to fail for many reason, but we are always logging: please wait for Celestia validators to commit data root in the error.

Ideally the message should only be shown when the error contains: "no data commitment has been generated for the provided height"

tx, err := d.DefendDA(blockHash)
 		if err != nil {
 			logger.Error("Failed to defend data availability, please wait for Celestia validators to commit data root", "err", err)

cli/cmd/defender_defendda.go Show resolved Hide resolved
@CryptoKass CryptoKass merged commit 340ac03 into main Feb 19, 2024
2 checks passed
@CryptoKass CryptoKass deleted the bugfix/handle-empty-response branch February 19, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants