mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-19 05:44:12 +01:00
common/setup: check libwally initialization
We already assume they were succesful, so we'd better be checking them. Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
This commit is contained in:
parent
08d32123d8
commit
5d9be5ab97
@ -27,6 +27,8 @@ static struct wally_operations wally_tal_ops = {
|
||||
|
||||
void common_setup(const char *argv0)
|
||||
{
|
||||
int wally_ret;
|
||||
|
||||
setup_locale();
|
||||
err_set_progname(argv0);
|
||||
|
||||
@ -37,8 +39,12 @@ void common_setup(const char *argv0)
|
||||
" available ?");
|
||||
|
||||
/* We set up Wally, the bitcoin wallet lib */
|
||||
wally_init(0);
|
||||
wally_set_operations(&wally_tal_ops);
|
||||
wally_ret = wally_init(0);
|
||||
if (wally_ret != WALLY_OK)
|
||||
errx(1, "Error initializing libwally: %i", wally_ret);
|
||||
wally_ret = wally_set_operations(&wally_tal_ops);
|
||||
if (wally_ret != WALLY_OK)
|
||||
errx(1, "Error setting libwally operations: %i", wally_ret);
|
||||
secp256k1_ctx = wally_get_secp_context();
|
||||
|
||||
setup_tmpctx();
|
||||
|
Loading…
Reference in New Issue
Block a user