mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 09:04:22 +01:00
daemon: add global secp256k1 context for easy access.
This caches the tables, so you're not supposed to regenerate it all the time. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -29,6 +29,8 @@ static struct lightningd_state *lightningd_state(void)
|
||||
|
||||
list_head_init(&state->peers);
|
||||
timers_init(&state->timers, time_now());
|
||||
state->secpctx = secp256k1_context_create(SECP256K1_CONTEXT_VERIFY
|
||||
| SECP256K1_CONTEXT_SIGN);
|
||||
return state;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user