From 6424b2decdaba4084dc719f1072faf7d08117500 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 12 Apr 2018 12:32:31 +0930 Subject: [PATCH] closing: initialize feerange->allow_mistakes. This exists for compatiblity with older versions, but it's currently uninitialized. Fixed-by: @ZmnSCPxj --- closingd/closing.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/closingd/closing.c b/closingd/closing.c index 96eea3590..270da93fd 100644 --- a/closingd/closing.c +++ b/closingd/closing.c @@ -338,7 +338,8 @@ struct feerange { static void init_feerange(struct feerange *feerange, u64 commitment_fee, - const u64 offer[NUM_SIDES]) + const u64 offer[NUM_SIDES], + bool allow_mistakes) { feerange->min = 0; @@ -349,6 +350,7 @@ static void init_feerange(struct feerange *feerange, * in [BOLT #3](03-transactions.md#fee-calculation). */ feerange->max = commitment_fee; + feerange->allow_mistakes = allow_mistakes; if (offer[LOCAL] > offer[REMOTE]) feerange->higher_side = LOCAL; @@ -526,7 +528,7 @@ int main(int argc, char *argv[]) } /* Now we have first two points, we can init fee range. */ - init_feerange(&feerange, commitment_fee, offer); + init_feerange(&feerange, commitment_fee, offer, deprecated_api); /* Now apply the one constraint from above (other is inside loop). */ adjust_feerange(&cs, gossip_index, &channel_id, &feerange,