Skip to content

Commit 728e3a8

Browse files
committed
Merge #760: fix: don't randomize the global context twice
b7b999e fix: don't randomize the global context twice (DaniPopes) Pull request description: Closes #759. ACKs for top commit: apoelstra: ACK b7b999e; successfully ran local tests; thanks! Tree-SHA512: 6f82befb20c062460f08af01d6664f6c2013c23adaa2462aabf2ab8fd19afe08d53d9b155bc8c306abecf4a0bbc5b350c997b23f675bca05ea5df435ffe980b1
2 parents bb4972f + b7b999e commit 728e3a8

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/context.rs

+1-11
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,7 @@ pub mod global {
4646
static ONCE: Once = Once::new();
4747
static mut CONTEXT: Option<Secp256k1<All>> = None;
4848
ONCE.call_once(|| unsafe {
49-
let mut ctx = Secp256k1::new();
50-
#[cfg(all(
51-
not(target_arch = "wasm32"),
52-
feature = "rand",
53-
feature = "std",
54-
not(feature = "global-context-less-secure")
55-
))]
56-
{
57-
ctx.randomize(&mut rand::thread_rng());
58-
}
59-
CONTEXT = Some(ctx);
49+
CONTEXT = Some(Secp256k1::new());
6050
});
6151
unsafe { CONTEXT.as_ref().unwrap() }
6252
}

0 commit comments

Comments
 (0)