mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-18 22:54:25 +01:00
elements: Remove global is_elements variable in favor of chainparams
No need to keep duplicate globals.
This commit is contained in:
committed by
Rusty Russell
parent
ef7a63d8f8
commit
d5f0c08a88
@@ -1,4 +1,5 @@
|
||||
#include "utils.h"
|
||||
#include <bitcoin/chainparams.h>
|
||||
#include <ccan/list/list.h>
|
||||
#include <ccan/str/hex/hex.h>
|
||||
#include <ccan/tal/str/str.h>
|
||||
@@ -6,10 +7,14 @@
|
||||
|
||||
secp256k1_context *secp256k1_ctx;
|
||||
const tal_t *tmpctx;
|
||||
bool is_elements = false;
|
||||
|
||||
const struct chainparams *chainparams;
|
||||
|
||||
bool is_elements(const struct chainparams *chainparams)
|
||||
{
|
||||
return chainparams->is_elements;
|
||||
}
|
||||
|
||||
char *tal_hexstr(const tal_t *ctx, const void *data, size_t len)
|
||||
{
|
||||
char *str = tal_arr(ctx, char, hex_str_size(len));
|
||||
|
||||
Reference in New Issue
Block a user