Fix pre-noise outbound peer disconnect panic found by fuzzer
authorMatt Corallo <git@bluematt.me>
Fri, 2 Nov 2018 14:50:32 +0000 (10:50 -0400)
committerMatt Corallo <git@bluematt.me>
Fri, 2 Nov 2018 14:50:32 +0000 (10:50 -0400)
commit366e79615b7251771465d6c69c2941ac233674da
treed3fde82c5e9d80ee2b1788aa10e1b75ce8ae057e
parentb030e84ad8f9eeb678fa52fa3b589f9e937a46ec
Fix pre-noise outbound peer disconnect panic found by fuzzer

If we make an outbound connection to a peer who we are already
connected to, and the outbound connection fails
pre-noise-completion, we will remove the original peer connection
from our node_id_to_descriptor map.

The fuzzer managed to find this by crashing in Channel's assertions
that we don't do a get_channel_reestablish() when the Channel isn't
already marked disconnected.
src/ln/peer_handler.rs