mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-25 01:54:21 +01:00
mkfunding: add missing common_setup
Was crashing on allocating wally memory, b/c was missing the wally_init that's wrapped up in common_setup Assisted-By: @TKChattoraj
This commit is contained in:
committed by
Christian Decker
parent
1a1c0a38fc
commit
87616b7ffc
@@ -12,6 +12,7 @@
|
||||
#include <ccan/str/hex/hex.h>
|
||||
#include <common/derive_basepoints.h>
|
||||
#include <common/initial_commit_tx.h>
|
||||
#include <common/setup.h>
|
||||
#include <common/status.h>
|
||||
#include <common/type_to_string.h>
|
||||
#include <common/utxo.h>
|
||||
@@ -86,7 +87,7 @@ int main(int argc, char *argv[])
|
||||
struct bitcoin_txid txid;
|
||||
u8 **witnesses;
|
||||
|
||||
setup_locale();
|
||||
common_setup(argv[0]);
|
||||
chainparams = chainparams_for_network("bitcoin");
|
||||
|
||||
secp256k1_ctx = secp256k1_context_create(SECP256K1_CONTEXT_VERIFY |
|
||||
@@ -168,6 +169,7 @@ int main(int argc, char *argv[])
|
||||
type_to_string(NULL, struct bitcoin_txid, &txid));
|
||||
|
||||
printf("tx: %s\n", tal_hex(NULL, linearize_tx(NULL, tx)));
|
||||
common_shutdown();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user