jsonrpc: populate ld->jsonrpc ourselves, so we can use it.

Next patch will call commands to get usage inside jsonrpc_new(): to do
this it will need access to ld->jsonrpc, so we can't use the current
pattern.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-02-04 21:25:42 +10:30
parent cc76416447
commit dabdefefae
4 changed files with 15 additions and 12 deletions

View File

@@ -207,7 +207,7 @@ static struct lightningd *new_lightningd(const tal_t *ctx)
* lightningd needs to have something to put those in. This
* is that :-)
*/
ld->jsonrpc = jsonrpc_new(ld, ld);
jsonrpc_setup(ld);
/*~ We run a number of plugins (subprocesses that we talk JSON-RPC with)
*alongside this process. This allows us to have an easy way for users