mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
elements: Global variable whether we are running on elements
Using a global variable is a bit lazy, but weaving the network type through the entire stack is a daunting task. Maybe we can make that happen at a later stage. Most of the changes in `chainparams.c` are just formatting the `genesis_blockhash` a bit nicer (`clang-format` to the rescue). Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
9025a3cd39
commit
a300dea7e6
@@ -244,6 +244,7 @@ static char *opt_set_network(const char *arg, struct lightningd *ld)
|
||||
ld->topology->bitcoind->chainparams = chainparams_for_network(arg);
|
||||
if (!ld->topology->bitcoind->chainparams)
|
||||
return tal_fmt(NULL, "Unknown network name '%s'", arg);
|
||||
is_elements = ld->topology->bitcoind->chainparams->is_elements;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user