You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
613 B
20 lines
613 B
10 years ago
|
#ifndef LIGHTNING_PERMUTE_TX_H
|
||
|
#define LIGHTNING_PERMUTE_TX_H
|
||
9 years ago
|
#include "config.h"
|
||
9 years ago
|
#include "bitcoin/tx.h"
|
||
10 years ago
|
|
||
8 years ago
|
struct htlc;
|
||
|
|
||
8 years ago
|
/* Permute the transaction into BIP69 order. */
|
||
8 years ago
|
void permute_inputs(struct bitcoin_tx_input *inputs, size_t num_inputs,
|
||
|
const void **map);
|
||
10 years ago
|
|
||
8 years ago
|
/* If @map is non-NULL, it will be permuted the same as the outputs.
|
||
8 years ago
|
*
|
||
8 years ago
|
* So the caller initiates the map with which htlcs are used, it
|
||
|
* can easily see which htlc (if any) is in output #0 with map[0].
|
||
8 years ago
|
*/
|
||
|
void permute_outputs(struct bitcoin_tx_output *outputs, size_t num_outputs,
|
||
8 years ago
|
const void **map);
|
||
10 years ago
|
#endif /* LIGHTNING_PERMUTE_TX_H */
|