2015-05-29 12:59:09 +09:30
|
|
|
#ifndef LIGHTNING_PERMUTE_TX_H
|
|
|
|
#define LIGHTNING_PERMUTE_TX_H
|
2016-01-22 06:38:08 +10:30
|
|
|
#include "config.h"
|
2015-06-12 11:53:27 +09:30
|
|
|
#include "bitcoin/tx.h"
|
2015-05-29 12:59:09 +09:30
|
|
|
|
2015-07-20 09:56:15 +09:30
|
|
|
/* Permute the transaction into BIP69 order.
|
2015-05-29 12:59:09 +09:30
|
|
|
* map[0] is set to the new index of input 0, etc.
|
|
|
|
*/
|
2015-07-20 09:56:15 +09:30
|
|
|
void permute_inputs(struct bitcoin_tx_input *inputs,
|
2015-05-29 12:59:09 +09:30
|
|
|
size_t num_inputs,
|
2016-05-02 16:05:56 +09:30
|
|
|
int *map);
|
2015-05-29 12:59:09 +09:30
|
|
|
|
2015-07-20 09:56:15 +09:30
|
|
|
void permute_outputs(struct bitcoin_tx_output *outputs,
|
2015-05-29 12:59:09 +09:30
|
|
|
size_t num_outputs,
|
2016-05-02 16:05:56 +09:30
|
|
|
int *map);
|
2015-05-29 12:59:09 +09:30
|
|
|
#endif /* LIGHTNING_PERMUTE_TX_H */
|