reservations: add weight of fee-output to weight calculation

have the estimated fee include all the weight, even fee outputs
This commit is contained in:
niftynei
2021-02-02 16:04:31 -06:00
committed by neil saitug
parent ea95ad9c12
commit 0d4bb06dad

View File

@@ -393,6 +393,8 @@ fee_calc:
struct amount_sat est_fee =
amount_tx_fee(feerate_per_kw, weight);
psbt_append_output(psbt, NULL, est_fee);
/* Add additional weight of fee output */
weight += bitcoin_tx_output_weight(0);
}
response = json_stream_success(cmd);
json_add_psbt(response, "psbt", psbt);