mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
Add --bitcoin-rpcport option to pass to bitcoin-rpc
This commit is contained in:
parent
0bf1b01425
commit
8c00e4f98d
@ -48,6 +48,10 @@ static const char **gather_args(const struct bitcoind *bitcoind,
|
||||
add_arg(&args,
|
||||
tal_fmt(args, "-rpcconnect=%s", bitcoind->rpcconnect));
|
||||
|
||||
if (bitcoind->rpcport)
|
||||
add_arg(&args,
|
||||
tal_fmt(args, "-rpcport=%s", bitcoind->rpcport));
|
||||
|
||||
if (bitcoind->rpcuser)
|
||||
add_arg(&args, tal_fmt(args, "-rpcuser=%s", bitcoind->rpcuser));
|
||||
|
||||
@ -804,6 +808,7 @@ struct bitcoind *new_bitcoind(const tal_t *ctx,
|
||||
bitcoind->rpcuser = NULL;
|
||||
bitcoind->rpcpass = NULL;
|
||||
bitcoind->rpcconnect = NULL;
|
||||
bitcoind->rpcport = NULL;
|
||||
list_head_init(&bitcoind->pending);
|
||||
tal_add_destructor(bitcoind, destroy_bitcoind);
|
||||
|
||||
|
@ -54,7 +54,7 @@ struct bitcoind {
|
||||
bool shutdown;
|
||||
|
||||
/* Passthrough parameters for bitcoin-cli */
|
||||
char *rpcuser, *rpcpass, *rpcconnect;
|
||||
char *rpcuser, *rpcpass, *rpcconnect, *rpcport;
|
||||
};
|
||||
|
||||
struct bitcoind *new_bitcoind(const tal_t *ctx,
|
||||
|
@ -648,6 +648,9 @@ void register_opts(struct lightningd *ld)
|
||||
opt_register_arg("--bitcoin-rpcconnect", opt_set_talstr, NULL,
|
||||
&ld->topology->bitcoind->rpcconnect,
|
||||
"bitcoind RPC host to connect to");
|
||||
opt_register_arg("--bitcoin-rpcport", opt_set_talstr, NULL,
|
||||
&ld->topology->bitcoind->rpcport,
|
||||
"bitcoind RPC port");
|
||||
opt_register_arg("--pid-file=<file>", opt_set_talstr, opt_show_charp,
|
||||
&ld->pidfile,
|
||||
"Specify pid file");
|
||||
|
Loading…
Reference in New Issue
Block a user