Move a ton of Channel functions to ChannelError from HandleError
authorMatt Corallo <git@bluematt.me>
Tue, 30 Oct 2018 00:38:29 +0000 (20:38 -0400)
committerMatt Corallo <git@bluematt.me>
Tue, 20 Nov 2018 21:33:32 +0000 (16:33 -0500)
commit90816dd9d8e868c3b8bea19b4f4a4fecf1678f11
tree0103b33a7e7cd8ec5d21ff8d43a630541ef45f0c
parent315589076609d574c4367046d7270f18957cad1b
Move a ton of Channel functions to ChannelError from HandleError

This is a big patch, but its all very mechanical, everything here
should be pretty obvious, and it all has to happen at once due to a
few common utility functions all having the same return type.

Note that this exposes a race in channel closure where we may
access a channel via some non-peer-specific mechanism like
forwarding an HTLC or sending a payment during the time between
the channel gave us a Close error and expected us to never call it
again and the time we actually removed it from the channel_state
set outside of the internal_* handler.
src/ln/channel.rs
src/ln/channelmanager.rs