elements: Move from a global is_elements to a global chainparams

We now have a pointer to chainparams, that fails valgrind if we do anything
chain-specific before setting it.

Suggested-by: Rusty Russell <@rustyrussell>
This commit is contained in:
Christian Decker
2019-09-25 22:38:45 +02:00
committed by Rusty Russell
parent 378745391d
commit ef7a63d8f8
28 changed files with 70 additions and 42 deletions

View File

@@ -13,6 +13,7 @@ extern secp256k1_context *secp256k1_ctx;
/* FIXME: Instead of using this as a global, we might want to pass it as
* context whenever we need it. The global var is just lazy... */
extern bool is_elements;
extern const struct chainparams *chainparams;
/* Allocate and fill in a hex-encoded string of this data. */
char *tal_hexstr(const tal_t *ctx, const void *data, size_t len);