From 0d4bb06dadfc2aabc0e6395bc2b9afe8f528c59e Mon Sep 17 00:00:00 2001 From: niftynei Date: Tue, 2 Feb 2021 16:04:31 -0600 Subject: [PATCH] reservations: add weight of fee-output to weight calculation have the estimated fee include all the weight, even fee outputs --- wallet/reservation.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wallet/reservation.c b/wallet/reservation.c index 1e678608e..9f433e60b 100644 --- a/wallet/reservation.c +++ b/wallet/reservation.c @@ -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);