mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 06:41:44 +01:00
dualopend: remove min_witness_weight requirement
Also fix move on uninitialized value
This commit is contained in:
parent
5d061c4cf4
commit
db3d9e9250
2 changed files with 1 additions and 9 deletions
|
@ -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);
|
struct tx_state *tx_state = tal(ctx, struct tx_state);
|
||||||
tx_state->psbt = NULL;
|
tx_state->psbt = NULL;
|
||||||
tx_state->remote_funding_sigs_rcvd = false;
|
tx_state->remote_funding_sigs_rcvd = false;
|
||||||
|
tx_state->has_commitments = false;
|
||||||
|
|
||||||
tx_state->lease_expiry = 0;
|
tx_state->lease_expiry = 0;
|
||||||
tx_state->lease_fee = AMOUNT_SAT(0);
|
tx_state->lease_fee = AMOUNT_SAT(0);
|
||||||
|
|
|
@ -1421,15 +1421,6 @@ perform_fundpsbt(struct multifundchannel_command *mfc, u32 feerate)
|
||||||
tal_fmt(tmpctx, "%zu", startweight));
|
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. */
|
/* Handle adding a change output if required. */
|
||||||
json_add_bool(req->js, "excess_as_change", true);
|
json_add_bool(req->js, "excess_as_change", true);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue