mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-10 17:44:22 +01:00
psbt: save the index of the change on the 'parent'
Note that for removals, the index will be on the original; for additions, the index will be on the new. Yes this is implicit.
This commit is contained in:
@@ -219,6 +219,7 @@ void psbt_sort_by_serial_id(struct wally_psbt *psbt)
|
||||
struct type##_set a; \
|
||||
a.type = from->type##s[index]; \
|
||||
a.tx_##type = from->tx->type##s[index]; \
|
||||
a.idx = index; \
|
||||
tal_arr_expand(&add_to, a); \
|
||||
} while (0)
|
||||
|
||||
|
||||
@@ -19,11 +19,15 @@ struct wally_map;
|
||||
struct input_set {
|
||||
struct wally_tx_input tx_input;
|
||||
struct wally_psbt_input input;
|
||||
/* index on PSBT of this input */
|
||||
size_t idx;
|
||||
};
|
||||
|
||||
struct output_set {
|
||||
struct wally_tx_output tx_output;
|
||||
struct wally_psbt_output output;
|
||||
/* index on PSBT of this output */
|
||||
size_t idx;
|
||||
};
|
||||
|
||||
struct psbt_changeset {
|
||||
|
||||
Reference in New Issue
Block a user