permute_tx: generic pointer map.

Turns out we want to permute transactions for the wallet too, so we
use void ** rather than assume we're shuffling htlc ** (and do inputs,
too!).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-02-21 15:15:29 +10:30
parent 4f6033ba29
commit 08e95d59b5
3 changed files with 28 additions and 18 deletions

View File

@@ -318,7 +318,8 @@ struct bitcoin_tx *commit_tx(const tal_t *ctx,
* 7. Sort the outputs into [BIP 69
* order](#transaction-input-and-output-ordering)
*/
permute_outputs(tx->output, tal_count(tx->output), *htlcmap);
permute_outputs(tx->output, tal_count(tx->output),
(const void **)*htlcmap);
/* BOLT #3:
*