Browse Source
- Wait until HTLCs are irrevocably removed before cleaning up their data structures (MPP and forwarding) - keep methods maybe_cleanup_mpp and maybe_cleanup_forwarding separate - perform cleanup in htlc_switch, so that process_unfulfilled_htlc has less side effects - In htlc_switch, we blank the onion_packet_hex field to signal that an HTLC has been processed. An item of chan.unfulfilled_htlcs may go through 4 stages: - 1. not forwarded yet: (None, onion_packet_hex) - 2. forwarded: (forwarding_key, onion_packet_hex) - 3. processed: (forwarding_key, None), not irrevocably removed yet - 4. done: (forwarding_key, None), irrevocably removed - in test_lnpeer, an extra iteration of htlc_switch has been added to trampoline forwarding testsmaster
3 changed files with 32 additions and 19 deletions
Loading…
Reference in new issue