-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
musig2: fix early nonce gen option #2003
musig2: fix early nonce gen option #2003
Conversation
Pull Request Test Coverage Report for Build 5519660551
💛 - Coveralls |
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.
Motivation makes sense, can we tack on a unit test to ensure the new code path works as expected and as a guard against regressions?
btcec/schnorr/musig2/context.go
Outdated
default: | ||
return nil, ErrSignersNotSpecified | ||
} | ||
|
||
// If early nonce generation is specified, then we'll generate |
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.
Ah I guess my previous use case always had the number of signers specified (case of LN channel funding).
39ec882
to
ff0d41d
Compare
I adapted the early nonce gen test to use both ways of creating a context. Can also add a completely new unit test if preferred. |
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.
Nice fix, LGTM 🎉
Previously the early nonce generation option was not being respected when creating the context, with the WithKnownSigners option being used. This commit fixes that.
This commit changes the early nonce gen test to use the KnownSigners Option for one of the contexts.
ff0d41d
to
883a03d
Compare
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 🎎
Previously the early nonce generation option was not being respected when creating the context, with the
WithKnownSigners
option being used.