Skip to content

Commit

Permalink
df-mfc: set the minimum input weight to 110 iif v2
Browse files Browse the repository at this point in the history
We only need a bumped up input weight if we're talking to nodes that
require v2.
  • Loading branch information
niftynei authored and rustyrussell committed Dec 2, 2020
1 parent b017340 commit 4185a86
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions plugins/spender/multifundchannel.c
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,16 @@ perform_fundpsbt(struct multifundchannel_command *mfc)
tal_fmt(tmpctx, "%zu", startweight));
}

/* If we've got v2 opens, we need to use a min weight of 110. */
/* BOLT-78de9a79b491ae9fb84b1fdb4546bacf642dce87 #2
* The minimum witness weight for an input is 110.
*/
if (dest_count(mfc, OPEN_CHANNEL) > 0) {
json_add_string(req->js, "min_witness_weight",
tal_fmt(tmpctx, "%u", 110));
}


return send_outreq(mfc->cmd->plugin, req);
}

Expand Down

0 comments on commit 4185a86

Please sign in to comment.