| 83 | } |
| 84 | |
| 85 | static void add_in_out_with_serial(struct wally_psbt *psbt, |
| 86 | size_t serial_id, |
| 87 | size_t default_value) |
| 88 | { |
| 89 | struct bitcoin_outpoint outpoint; |
| 90 | u8 *script; |
| 91 | struct amount_sat sat; |
| 92 | struct wally_psbt_input *in; |
| 93 | struct wally_psbt_output *out; |
| 94 | |
| 95 | memset(&outpoint, default_value, sizeof(outpoint)); |
| 96 | in = psbt_append_input(psbt, &outpoint, default_value, |
| 97 | NULL, NULL, NULL); |
| 98 | if (!in) |
| 99 | abort(); |
| 100 | psbt_input_set_serial_id(psbt, in, serial_id); |
| 101 | |
| 102 | script = tal_arr(tmpctx, u8, 20); |
| 103 | memset(script, default_value, 20); |
| 104 | sat = amount_sat(default_value); |
| 105 | out = psbt_append_output(psbt, script, sat); |
| 106 | if (!out) |
| 107 | abort(); |
| 108 | psbt_output_set_serial_id(psbt, out, serial_id); |
| 109 | } |
| 110 | |
| 111 | /* Try changing up the serial ids */ |
| 112 | static void change_serials(void) |
no test coverage detected