| 503 | } |
| 504 | |
| 505 | struct command_result * |
| 506 | check_sigs_ready(struct multifundchannel_command *mfc) |
| 507 | { |
| 508 | static struct command_result *result; |
| 509 | bool ready = true; |
| 510 | |
| 511 | for (size_t i = 0; i < tal_count(mfc->destinations); i++) { |
| 512 | enum multifundchannel_state state = |
| 513 | is_v2(&mfc->destinations[i]) ? |
| 514 | MULTIFUNDCHANNEL_SIGNED : |
| 515 | MULTIFUNDCHANNEL_COMPLETED; |
| 516 | |
| 517 | ready &= mfc->destinations[i].state == state; |
| 518 | } |
| 519 | |
| 520 | if (ready) { |
| 521 | result = collect_sigs(mfc); |
| 522 | if (result) |
| 523 | return result; |
| 524 | } |
| 525 | |
| 526 | return command_still_pending(mfc->cmd); |
| 527 | } |
| 528 | |
| 529 | static struct command_result *json_peer_sigs(struct command *cmd, |
| 530 | const char *buf, |
no test coverage detected