]> git.bitcoin.ninja Git - rust-lightning/commit
Sync get_update_fail_htlc, get_update_fulfill_htlc state err result
authorMatt Corallo <git@bluematt.me>
Thu, 6 Sep 2018 23:12:32 +0000 (19:12 -0400)
committerMatt Corallo <git@bluematt.me>
Sun, 9 Sep 2018 15:36:00 +0000 (11:36 -0400)
commit8cad2ffa9b40704721089cb564d331e684c38052
tree8acfedad79d9c43243ccd1a4eb9e3aa13825fa3c
parent673912e7695be6b2cbfe03c38ddd37cb1b5a4655
Sync get_update_fail_htlc, get_update_fulfill_htlc state err result

Both get_update_fail_htlc and get_update_fulfill_htlc should never
be called before any HTLC could have been accepted (ie
pre-ChannelFunded) nor should they ever be called
post-ShutdownComplete as the Channel object should be destroyed at
that point. Previously get_update_fulfill_htlc would panic, but
get_update_fail_htlc would return an Err. For now make them both
panic but we can revisit this if we want to have fewer panics in
the future.
src/ln/channel.rs