mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
plugin: Tell the plugin which network we run on
The fundchannel plugin needs to know how to build a transaction, so we need to tell it which chainparams to use. Also adds `chainparams` as a global, since that seems to be the way to do things in plugins.
This commit is contained in:
committed by
Rusty Russell
parent
858b3f2b93
commit
14247283b2
@@ -1049,6 +1049,9 @@ plugin_populate_init_request(struct plugin *plugin, struct jsonrpc_request *req)
|
||||
json_add_string(req->stream, "lightning-dir", ld->config_dir);
|
||||
json_add_string(req->stream, "rpc-file", ld->rpc_filename);
|
||||
json_add_bool(req->stream, "startup", plugin->plugins->startup);
|
||||
json_add_string(
|
||||
req->stream, "network",
|
||||
plugin->plugins->ld->topology->bitcoind->chainparams->network_name);
|
||||
json_object_end(req->stream);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user