#1274 brings up that our peers with whom we have channels to, often end up having connected: false.
One way to help this is to have a periodic auto-reconnect every 5 to 10 minutes, to all known peers with whom we have channels to.
- Modify
connect so it can be invoked internally. See what I did in lightningd/pay.c to sendpay command: I made a public send_payment function that is given a callback for completion or failure, as well as a struct sendpay_result for the result of payment. This is needed so that connect can be invoked internally by lightningd.
- Set up a tweakable autoconnect system (can set autoonnect cycle time range by command line, default 5 to 10 minutes). Make sure to randomize the time between autoconnect attempts to reduce network spike. Pay attention to
addr_unknown field from the gossip connection failure message: if this is true then we really cannot connect to the peer due to lack of knowledge of address.
#1274 brings up that our peers with whom we have channels to, often end up having
connected: false.One way to help this is to have a periodic auto-reconnect every 5 to 10 minutes, to all known peers with whom we have channels to.
connectso it can be invoked internally. See what I did inlightningd/pay.ctosendpaycommand: I made a publicsend_paymentfunction that is given a callback for completion or failure, as well as astruct sendpay_resultfor the result of payment. This is needed so thatconnectcan be invoked internally by lightningd.addr_unknownfield from the gossip connection failure message: if this is true then we really cannot connect to the peer due to lack of knowledge of address.