mirror of
https://github.com/ElementsProject/lightning.git
synced 2026-08-13 12:32:55 +02:00
spender: fix multifundchannel ids.
They're not always 34 (aka '"'). This is a side-effect of ids changing from u64 to strings quite a while ago. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
20257c3308
commit
efacada7dd
2 changed files with 3 additions and 5 deletions
|
|
@ -14,7 +14,8 @@
|
|||
#include <plugins/spender/multifundchannel.h>
|
||||
#include <plugins/spender/openchannel.h>
|
||||
|
||||
extern const struct chainparams *chainparams;
|
||||
/* Global counter to create unique mfc->id values */
|
||||
static u64 mfc_id;
|
||||
|
||||
/* Which destinations has a value of "all", or -1. */
|
||||
static struct multifundchannel_destination *all_dest(const struct multifundchannel_command *mfc)
|
||||
|
|
@ -1999,7 +2000,7 @@ json_multifundchannel(struct command *cmd,
|
|||
/* Should exist; it would only nonexist if it were a notification. */
|
||||
assert(cmd->id);
|
||||
|
||||
mfc->id = *cmd->id;
|
||||
mfc->id = ++mfc_id;
|
||||
mfc->cmd = cmd;
|
||||
|
||||
/* Steal destinations array, and set up mfc pointers */
|
||||
|
|
|
|||
|
|
@ -171,9 +171,6 @@ struct multifundchannel_command {
|
|||
multiple `multifundchannel` commands in parallel, or
|
||||
in very close sequence, which might confuse us with
|
||||
*which* debug message belongs with *which* command.
|
||||
|
||||
We actually just reuse the id from the cmd.
|
||||
Store it here for easier access.
|
||||
*/
|
||||
u64 id;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue