electrum
electrum copied to clipboard
lnpeer: async `maybe_send_commitment`
this builds on top of https://github.com/spesmilo/electrum/pull/7835 (first commit is from there)
This is re https://github.com/spesmilo/electrum/commit/cc1b4a5c903ac82d20d8107f45d829d8d1270a80#commitcomment-74922012
- Await pong before sending commitment_signed (per BOLT-2)
We await self.ping_if_required() inside maybe_send_commitment().
This needed making maybe_send_commitment async, which really quite snowballed o.O
Anyway, this is a separate PR from https://github.com/spesmilo/electrum/pull/7835, as that PR is useful in itself.
I've changed this to draft as it needs some discussion before a potential merge.