-
Notifications
You must be signed in to change notification settings - Fork 1.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
Use global secp256k1 context for tests #12339
Conversation
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 think we want to use the global context for all of these fns because even the signing context still does new randomization
@@ -20,7 +20,7 @@ alloy-consensus.workspace = true | |||
alloy-eips.workspace = true | |||
|
|||
rand.workspace = true | |||
secp256k1 = { workspace = true, features = ["rand"] } | |||
secp256k1 = { workspace = true, features = ["rand", "global-context"] } |
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.
this actually looks unused because no changes actually use the global context
@@ -141,7 +141,7 @@ pub fn random_signed_tx<R: Rng>(rng: &mut R) -> TransactionSigned { | |||
|
|||
/// Signs the [Transaction] with a random key pair. | |||
pub fn sign_tx_with_random_key_pair<R: Rng>(rng: &mut R, tx: Transaction) -> TransactionSigned { | |||
let secp = Secp256k1::new(); | |||
let secp = Secp256k1::signing_only(); |
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.
this isn't the global context
cd93dee
to
0b2fb1d
Compare
@mattsse please check again and let me know if this is what you mean by global context |
Closes #12260