]> git.bitcoin.ninja Git - rust-lightning/commit
Drop Result for ChannelMessageHandler methods 2020-01-398-fixups
authorAntoine Riard <ariard@student.42.fr>
Tue, 5 Nov 2019 23:51:05 +0000 (18:51 -0500)
committerMatt Corallo <git@bluematt.me>
Mon, 6 Jan 2020 01:50:07 +0000 (20:50 -0500)
commit933ae3470309f21ef7537ffbcdc42070d60e1e74
tree152c5fa6cc6cbcb06fe9a8e2d1d313e2f6259408
parent29ace598deac67f0bc9d6bad3d251d55af3a6ebd
Drop Result for ChannelMessageHandler methods

Simplify interfaces between ChannelMessageHandler and PeerManager,
by switching all ChannelMessageHandler errors to HandleError sent
internally instead of being return. With further refactors in Router
and PeerChannelEncryptor, errors management on the PeerManager-side
won't be splitted between try_potential_handleerror and HandleError
processing.

Inside ChannelManager, we now log MsgHandleErrInternal and send
ErrorAction to PeerManager.

On a high-level, it should allow client using API to be more flexible
by polling events instead of waiting function call returns.

We also update handle_error macro to take channel_state_lock from
caller which should avoid some deadlock potential for some edges
cases.

Filter out IgnoreError in handle_error macro, update test in
consequence.
fuzz/src/chanmon_consistency.rs
lightning/src/ln/chanmon_update_fail_tests.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/msgs.rs
lightning/src/ln/peer_handler.rs
lightning/src/util/test_utils.rs