diff --git a/plugins/spender/multifundchannel.c b/plugins/spender/multifundchannel.c index ef854bee9..5fef05204 100644 --- a/plugins/spender/multifundchannel.c +++ b/plugins/spender/multifundchannel.c @@ -14,7 +14,8 @@ #include #include -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 */ diff --git a/plugins/spender/multifundchannel.h b/plugins/spender/multifundchannel.h index 966ebd4b3..891babca3 100644 --- a/plugins/spender/multifundchannel.h +++ b/plugins/spender/multifundchannel.h @@ -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;