| 558 | } |
| 559 | |
| 560 | static bool find_txout(struct wally_psbt *psbt, const u8 *wscript, u32 *funding_txout) |
| 561 | { |
| 562 | for (size_t i = 0; i < psbt->num_outputs; i++) { |
| 563 | if (memeq(wscript, tal_bytelen(wscript), psbt->tx->outputs[i].script, |
| 564 | psbt->tx->outputs[i].script_len)) { |
| 565 | *funding_txout = i; |
| 566 | return true; |
| 567 | } |
| 568 | } |
| 569 | return false; |
| 570 | } |
| 571 | |
| 572 | static char *check_balances(const tal_t *ctx, |
| 573 | struct state *state, |
no test coverage detected