plugins icon indicating copy to clipboard operation
plugins copied to clipboard

feeadjuster: various updates/fixes

Open daywalker90 opened this issue 1 year ago • 0 comments

Ok so i was bored and went over the feeadjuster plugin because @grubles said there were problems with it.

I found a compatibility issue in #457 with listconfigs so i made a wrapper function to support both the old and new structure of listconfigs. I went over all the feeadjuster issues that were reporting bugs and most of them are probably users who updated their node but not their pyln-client, since we can't raise the version in requirements.txt ourselves because that would also break compatibility (maybe fixed by this ?).

But i also found an actual issue in #199 which i fixed by always getting the channel balance from a rpc call to listpeers/listpeerchannels instead of doing math with the data from the forward_event. We need to do this because between forwards there can be invoices getting paid, payments sent out or channel splices. Listening for these events is rather pointless since they don't contain data about what channel balances changed, so we would have to do rpc calls anyways. Unfortunately listpeers/listpeerchannels does not update quite as fast as the forward_event so we have to wait a bit.

Then @grubles pointed me to the PR #467 from @m-schmoock and i incorporated it together with my fixes.

Then i tested feeadjuster against CLN 23.02.2, 23.05.2, 23.08.1, 23.11.2 and 24.02.2

I had to adjust the tests a bit to accomodate for the bad gossip retransmission in older CLN versions (it's still slightly flaky but who cares)

just rewrite it in rust lul

daywalker90 avatar May 08 '24 21:05 daywalker90