| 623 | } |
| 624 | |
| 625 | static void handle_spend_created(struct tracked_output *out, const u8 *msg) |
| 626 | { |
| 627 | struct onchain_witness_element **witness; |
| 628 | bool worthwhile; |
| 629 | |
| 630 | if (!fromwire_onchaind_spend_created(tmpctx, msg, &worthwhile, &witness)) |
| 631 | master_badmsg(WIRE_ONCHAIND_SPEND_CREATED, msg); |
| 632 | |
| 633 | out->proposal->welements |
| 634 | = cast_const2(const struct onchain_witness_element **, |
| 635 | tal_steal(out->proposal, witness)); |
| 636 | |
| 637 | /* Did it decide it's not worth it? Don't wait for it. */ |
| 638 | if (!worthwhile) |
| 639 | ignore_output(out); |
| 640 | } |
| 641 | |
| 642 | static struct proposed_resolution *new_proposed_resolution(struct tracked_output *out, |
| 643 | unsigned int block_required, |
no test coverage detected