peer: don't fret about fees too low on testnet.

Testnet fees are all over the place: don't close a connection due to
that.

Closes: #59
Reported-by: Thomas Daede <daede003@umn.edu>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2016-11-06 14:47:16 +10:30
parent b49b90d5c3
commit 04cff14ac8
1 changed files with 2 additions and 0 deletions

View File

@ -3038,8 +3038,10 @@ static enum watch_result anchor_depthchange(struct peer *peer,
* current commitment transaction will not be processed in a
* timely manner (see "Risks With HTLC Timeouts").
*/
/* Note: we don't do this when we're told to ignore fees. */
/* FIXME: BOLT should say what to do if it can't! We drop conn. */
if (!state_is_onchain(peer->state) && !state_is_error(peer->state)
&& peer->dstate->config.commitment_fee_min_percent != 0
&& peer->local.commit->cstate->fee_rate < get_feerate(peer->dstate)) {
log_broken(peer->log, "fee rate %"PRIu64" lower than %"PRIu64,
peer->local.commit->cstate->fee_rate,