-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Fix skip confirm logic #7085
Fix skip confirm logic #7085
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7085 +/- ##
==========================================
- Coverage 55.60% 54.54% -1.06%
==========================================
Files 457 550 +93
Lines 27440 37690 +10250
==========================================
+ Hits 15257 20558 +5301
- Misses 11083 15442 +4359
- Partials 1100 1690 +590 |
Liveness test is broken on master and being tackled here #7095 |
if key == nil { | ||
return nil, nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the pubkey is nil, error
makes sense. Is there a reason to handle nil separately?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nil is a valid pubkey, so it shouldn't error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought PublicKey was a sum. Can you explain how nil is a valid pubkey?
Edit: we're migrating to Any, but imo it should still not be nil?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have full context, @aaronc can explain better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All fields in proto are optional by default but pubkey is definitely optional. nil
is correct here. I can't think of any other good way to handle this. Let's add an explanatory comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also add a case for key.Sum
being nil
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Could you add aaron's 2 suggestions?
Let's add an explanatory comment.
We should also add a case for key.Sum being nil.
Description
This PR addresses issues with flags skip-confirmation and dry-run
closes: #7079
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes