mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
peer: fix comparison bug if our connection_fee is negative.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
a4346b56f6
commit
15b42b89db
@ -457,7 +457,8 @@ static void route_htlc_onwards(struct peer *peer,
|
||||
return;
|
||||
|
||||
/* Offered fee must be sufficient. */
|
||||
if (htlc->msatoshis - msatoshis < connection_fee(next->nc, msatoshis)) {
|
||||
if ((s64)(htlc->msatoshis - msatoshis)
|
||||
< connection_fee(next->nc, msatoshis)) {
|
||||
log_unusual(peer->log,
|
||||
"Insufficient fee for HTLC %"PRIu64
|
||||
": %"PRIi64" on %"PRIu64,
|
||||
|
Loading…
Reference in New Issue
Block a user