Skip to content

Commit

Permalink
gossipd: hear no wumbo.
Browse files Browse the repository at this point in the history
Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Nov 21, 2018
1 parent bed7986 commit 29b672b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gossipd/routing.c
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,12 @@ bool routing_add_channel_update(struct routing_state *rstate,
htlc_maximum_msat = chan->satoshis * 1000;
}

/* FIXME: https://github.com/lightningnetwork/lightning-rfc/pull/512
* says we MUST NOT exceed 2^32-1, but c-lightning did, so just trim
* rather than rejecting. */
if (htlc_maximum_msat > rstate->chainparams->max_payment_msat)
htlc_maximum_msat = rstate->chainparams->max_payment_msat;

direction = channel_flags & 0x1;
set_connection_values(chan, direction, fee_base_msat,
fee_proportional_millionths, expiry,
Expand Down

0 comments on commit 29b672b

Please sign in to comment.