althea-net / rita

Rita is a routing and billing protocol that allows devices to buy and sell bandwidth
https://docs.althea.net/
Apache License 2.0
91 stars 24 forks source link

Fix peer enforcement when payment issues are ongoing #851

Closed jkilpatr closed 10 months ago

jkilpatr commented 10 months ago

This is a pretty classic case of optimization causing problems. In order to try and optimize tunnel handling on routers with many tunnels we gated running the enforcmenet update code so that it was only run when there was an actual change to execute.

At a later date we came along and added a check there to prevent running enforcement code if we where having full node issues, but the other case was never considered. What if someone needed to be unenforced while payment issues where occuring?

This patch fixes the issue by removing some of the optimization and checking over enforcement more consistently to avoid users getting stuck in one wrong state or othe other.

I also cleaned up some old actix artifacts.