dualopend: remove min_witness_weight requirement

Also fix move on uninitialized value
This commit is contained in:
Alex Myers 2024-04-29 12:49:41 -05:00 committed by Alex Myers
parent 5d061c4cf4
commit db3d9e9250
2 changed files with 1 additions and 9 deletions

View file

@ -133,6 +133,7 @@ static struct tx_state *new_tx_state(const tal_t *ctx)
struct tx_state *tx_state = tal(ctx, struct tx_state);
tx_state->psbt = NULL;
tx_state->remote_funding_sigs_rcvd = false;
tx_state->has_commitments = false;
tx_state->lease_expiry = 0;
tx_state->lease_fee = AMOUNT_SAT(0);

View file

@ -1421,15 +1421,6 @@ perform_fundpsbt(struct multifundchannel_command *mfc, u32 feerate)
tal_fmt(tmpctx, "%zu", startweight));
}
/* If we've got v2 opens, we need to use a min weight of 110. */
/* BOLT-WHERE? #3:
* 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));
}
/* Handle adding a change output if required. */
json_add_bool(req->js, "excess_as_change", true);