Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lightningd/pay: simplify code significantly.
We no longer need a 'sendpay_result' structure, we can pass appropriate parameter directly now they're simple calls. Every waitsendpay command ends in tell_waiters_failed or tell_waiters_success, which call sendpay_success or sendpay_fail on all matching waiters. These all return 'struct command_result *'. In cases where the result is immediately known, we call sendpay_success/sendpay_fail directly for the command. This also adds a helpful 'failcodename' field to the JSON output. [ This was four separate cleanup patches, but that contained much redundancy and was even worse to review ] Signed-off-by: Rusty Russell <[email protected]>
- Loading branch information