Browse Source
'struct htlc' in channeld has a 'malformed' field, which is really only used in the "retransmit updates on reconnect" case. That's quite confusing, and I'm not entirely convinced that it can only be set to a failcode with the BADONION bit set. So generalize it, using the same logic we use in the master daemon: failcode: a locally generated error, for channeld to turn into the appropriate error message. fail: a remotely generated onion error, for forwarding. Either of these being non-zero/non-NULL means we've failed, and only one should be set at any time. We unify the "send htlc fail/fulfill update due to retransmit" and the normal send update paths, by always calling send_fail_or_fulfill. This unification revealed that we accidentally skipped the onion-wrapping stage when we retransmit failed htlcs! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>ppa-0.6.1
Rusty Russell
7 years ago
committed by
Christian Decker
3 changed files with 44 additions and 48 deletions
Loading…
Reference in new issue