From e97857847a1ade1a6756dbe8d37d2f27b39b1f8b Mon Sep 17 00:00:00 2001 From: Igor Cota Date: Thu, 28 Dec 2017 10:36:41 +0100 Subject: [PATCH] peer_control: make hardcoded feerates consistent between json_fund_channel and peer_offer_channel Stops some transactions from failing on the other side due to insufficient funds. --- lightningd/peer_control.c | 2 +- tests/test_lightningd.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c index dc5db5937..43198117f 100644 --- a/lightningd/peer_control.c +++ b/lightningd/peer_control.c @@ -2552,7 +2552,7 @@ static void peer_offer_channel(struct lightningd *ld, msg = towire_opening_funder(fc, fc->peer->funding_satoshi, fc->peer->push_msat, - get_feerate(ld->topology, FEERATE_IMMEDIATE), + get_feerate(ld->topology, FEERATE_NORMAL), max_minimum_depth, fc->change, fc->change_keyindex, fc->peer->channel_flags, diff --git a/tests/test_lightningd.py b/tests/test_lightningd.py index e0303a6dd..5d9532ce0 100644 --- a/tests/test_lightningd.py +++ b/tests/test_lightningd.py @@ -705,7 +705,7 @@ class LightningDTests(BaseLightningDTests): self.assertRaises(ValueError, self.pay, l1, l2, 10**9 + 1) # This is the fee, which needs to be taken into account for l1. - available = 10**9 - 13440 + available = 10**9 - 6720 # Reserve is 1%. reserve = 10**7