Enforce `max_balance_dust_htlc_msat` at HTLC reception/forward
authorAntoine Riard <dev@ariard.me>
Wed, 28 Jul 2021 23:55:11 +0000 (19:55 -0400)
committerAntoine Riard <dev@ariard.me>
Tue, 10 Aug 2021 21:30:15 +0000 (17:30 -0400)
commit1cf2b53508d36528ce4a416bcfc60e184601c4b5
tree221e484bba609ac738d10f620c150b6fcc5b70bd
parent29e755bf42e9e4114de4374fd94aaf89a17e0a45
Enforce `max_balance_dust_htlc_msat` at HTLC reception/forward

At `update_add_htlc()`/`send_htlc()`, we verify that the inbound/
outbound dust or the sum of both, on either sides of the link isn't
above new config setting `max_balance_dust_htlc_msat`.

A dust HTLC is hence defined as a trimmed-to-dust one, i.e including
the fee cost to publish its claiming transaction.
fuzz/src/chanmon_consistency.rs
lightning/src/ln/channel.rs
lightning/src/ln/functional_test_utils.rs