| 603 | } |
| 604 | |
| 605 | static struct tracked_output * |
| 606 | new_tracked_output(struct tracked_output ***outs, |
| 607 | const struct bitcoin_outpoint *outpoint, |
| 608 | u32 tx_blockheight, |
| 609 | enum tx_type tx_type, |
| 610 | struct amount_sat sat, |
| 611 | enum output_type output_type, |
| 612 | const struct htlc_stub *htlc, |
| 613 | const u8 *wscript, |
| 614 | const struct bitcoin_signature *remote_htlc_sig) |
| 615 | { |
| 616 | struct tracked_output *out = tal(*outs, struct tracked_output); |
| 617 | |
| 618 | status_debug("Tracking output %s: %s/%s", |
| 619 | fmt_bitcoin_outpoint(tmpctx, outpoint), |
| 620 | tx_type_name(tx_type), |
| 621 | output_type_name(output_type)); |
| 622 | |
| 623 | out->tx_type = tx_type; |
| 624 | out->outpoint = *outpoint; |
| 625 | out->tx_blockheight = tx_blockheight; |
| 626 | out->depth = 0; |
| 627 | out->sat = sat; |
| 628 | out->output_type = output_type; |
| 629 | out->proposal = NULL; |
| 630 | out->resolved = NULL; |
| 631 | out->fate = THEIR_HTLC_UNDECIDED; |
| 632 | if (htlc) |
| 633 | out->htlc = *htlc; |
| 634 | out->wscript = tal_steal(out, wscript); |
| 635 | out->remote_htlc_sig = tal_dup_or_null(out, struct bitcoin_signature, |
| 636 | remote_htlc_sig); |
| 637 | |
| 638 | tal_arr_expand(outs, out); |
| 639 | |
| 640 | return out; |
| 641 | } |
| 642 | |
| 643 | static void ignore_output(struct tracked_output *out) |
| 644 | { |
no test coverage detected