Penalize failed channels in Scorer
authorJeffrey Czyz <jkczyz@gmail.com>
Wed, 27 Oct 2021 15:39:22 +0000 (10:39 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Wed, 27 Oct 2021 19:03:51 +0000 (14:03 -0500)
commit5e595bbd3cf6c3acf4873738f2034cce0d0d935a
treebdae700a00609275165f84af80f8f40c2c6af544
parent5b3a33a8f21168d677f04a1b57805344a3afecbf
Penalize failed channels in Scorer

As payments fail, the channel responsible for the failure may be
penalized. Implement Scorer::payment_path_failed to penalize the failed
channel using a configured penalty. As time passes, the penalty is
reduced using exponential decay, though penalties will accumulate if the
channel continues to fail. The decay interval is also configurable.
fuzz/src/full_stack.rs
fuzz/src/router.rs
lightning-invoice/src/utils.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/shutdown_tests.rs
lightning/src/routing/router.rs
lightning/src/routing/scorer.rs