Refactor channel failure penalty logic
authorJeffrey Czyz <jkczyz@gmail.com>
Fri, 29 Oct 2021 04:23:45 +0000 (23:23 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Tue, 2 Nov 2021 19:48:35 +0000 (14:48 -0500)
commit88cf9b33c3982376b22d34ddaa4a958bf0d11bfd
treee4f6055af55cba1082a6eb6d65a16c6156a8c2e3
parent1c2b3c244e4273b6471b69e18d977298b4f60d44
Refactor channel failure penalty logic

Move channel failure penalty logic into a ChannelFailure abstraction.
This encapsulates the logic for accumulating penalties and decaying them
over time. It also is responsible for the no-std behavior. This cleans
up Scorer and will make it easier to serialize it.
lightning/src/routing/scorer.rs