mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-21 22:31:48 +01:00
closing: initialize feerange->allow_mistakes.
This exists for compatiblity with older versions, but it's currently uninitialized. Fixed-by: @ZmnSCPxj
This commit is contained in:
parent
f27cd3e43f
commit
6424b2decd
1 changed files with 4 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue