| 515 | } |
| 516 | |
| 517 | struct command_result * |
| 518 | check_sigs_ready(struct multifundchannel_command *mfc) |
| 519 | { |
| 520 | static struct command_result *result; |
| 521 | bool ready = true; |
| 522 | |
| 523 | for (size_t i = 0; i < tal_count(mfc->destinations); i++) { |
| 524 | enum multifundchannel_state state = |
| 525 | is_v2(&mfc->destinations[i]) ? |
| 526 | MULTIFUNDCHANNEL_SIGNED : |
| 527 | MULTIFUNDCHANNEL_COMPLETED; |
| 528 | |
| 529 | ready &= mfc->destinations[i].state == state; |
| 530 | } |
| 531 | |
| 532 | if (ready) { |
| 533 | result = collect_sigs(mfc); |
| 534 | if (result) |
| 535 | return result; |
| 536 | } |
| 537 | |
| 538 | return command_still_pending(mfc->cmd); |
| 539 | } |
| 540 | |
| 541 | static struct command_result *json_peer_sigs(struct command *cmd, |
| 542 | const char *buf, |
no test coverage detected