lightning-kmp
lightning-kmp copied to clipboard
Retrieve onchain feerate when we connect to an electrum server
When we connect to an electrum server we perform a "handshake" that includes exchanging protocol version messages and retrieving the server's current tip, and now we also retrieve onchain fees.
Moving fee retrieval into the electrum handshake means that if the server returns an error it will be caught by our coroutine exception handler and will not crash the application (as in the case now), I included a test for that.
Isn't this obsolete after #649 where we let our peer advertise the feerates they accept through the recommended_feerates
message?
I don't think so since we still ask the electrum server we're connected to for fee estimates and it may return an error ? The point here was do we add this to the handshake we perform when we connect to the server or do we try a different fix.