permute_tx: reintroduce permute map.

We used to have a permutation map; this reintroduces a variant which
uses the htlc pointers directly.

We need this because we have to send the htlc-tx signatures in output
order as part of the protocol: without two-stage HTLCs we only needed
to wire them up in the unilateral spend case so we simply brute-forced
the ordering.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-02-07 12:14:22 +10:30
parent e11d9304ab
commit 0fe53cc8e7
6 changed files with 37 additions and 8 deletions

View File

@@ -37,5 +37,6 @@ struct bitcoin_tx *commit_tx(const tal_t *ctx,
u64 local_pay_msat,
u64 remote_pay_msat,
const struct htlc **htlcs,
const struct htlc ***htlcmap,
u64 commit_number_obscurer);
#endif /* LIGHTNING_LIGHTNINGD_COMMIT_TX_H */