Include payment hash in more early payment logs
authorMatt Corallo <git@bluematt.me>
Wed, 23 Aug 2023 02:57:35 +0000 (02:57 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 23 Aug 2023 16:45:15 +0000 (16:45 +0000)
commit9e6992272972aa378677d9fd9f3bfa9628b84ff2
tree1cfea2bee7bcc34c2f0b58fad8fb93221eda8f78
parent0c250468d632ed6df93d8a9d34389a2cb61eac40
Include payment hash in more early payment logs

If a user has issues with a payment, the most obvious thing they'll
do is check logs for the payment hash. Thus, we should ensure our
logs that show a payment's lifecycle include the payment hash and
are emitted (a) as soon as LDK learns of the payment, (b) once the
payment goes out to the peer (which is already reasonably covered
in the commitment transaction building logs) and (c) when the
payment ultimately is fulfilled or fails.

Here we improve our logs for both (a) and (c).
lightning/src/ln/channel.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/outbound_payment.rs