Replace `get_payment_preimage_hash` with a function
authorMatt Corallo <git@bluematt.me>
Fri, 10 Feb 2023 19:08:39 +0000 (19:08 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 1 Mar 2023 18:28:14 +0000 (18:28 +0000)
commitaefe276fcb0f344e02315279da52b3dd464089e5
tree2a459bd54998087fca0f49763f79ba2e4471144f
parent4bb14adf94f616d153d57ccf66658100dd47f7de
Replace `get_payment_preimage_hash` with a function

The `get_payment_preimage_hash!()` macro has no reason to be a
macro so here we move its logic to a function and leave the macro
in place to avoid touching every line of code in the tests.

This reduces the `--profile=test --lib` `Zpretty=expanded` code
size from 329,119 LoC to 326,588 LoC.
lightning/src/ln/functional_test_utils.rs