| 1465 | } |
| 1466 | |
| 1467 | static void check_utxo_block(struct bitcoind *bitcoind UNUSED, |
| 1468 | const struct bitcoin_tx_output *txout, |
| 1469 | void *arg) |
| 1470 | { |
| 1471 | struct channel_send *cs = arg; |
| 1472 | struct command *cmd = cs->channel->openchannel_signed_cmd; |
| 1473 | const struct wally_tx *wtx = cs->wtx; |
| 1474 | |
| 1475 | /* note: if this tx has been included in a block *and spent* |
| 1476 | * then this will also fail... */ |
| 1477 | if (!txout) { |
| 1478 | if (cmd) { |
| 1479 | was_pending(command_fail(cmd, |
| 1480 | FUNDING_BROADCAST_FAIL, |
| 1481 | "Error broadcasting funding " |
| 1482 | "tx: %s. Unsent tx discarded " |
| 1483 | "%s.", |
| 1484 | cs->err_msg, |
| 1485 | type_to_string(tmpctx, |
| 1486 | struct wally_tx, |
| 1487 | wtx))); |
| 1488 | cs->channel->openchannel_signed_cmd = NULL; |
| 1489 | } |
| 1490 | |
| 1491 | log_unusual(cs->channel->log, |
| 1492 | "Error broadcasting funding " |
| 1493 | "tx: %s. Unsent tx discarded " |
| 1494 | "%s.", |
| 1495 | cs->err_msg, |
| 1496 | type_to_string(tmpctx, struct wally_tx, wtx)); |
| 1497 | } else |
| 1498 | handle_tx_broadcast(cs); |
| 1499 | |
| 1500 | tal_free(cs); |
| 1501 | } |
| 1502 | |
| 1503 | static void sendfunding_done(struct bitcoind *bitcoind UNUSED, |
| 1504 | bool success, const char *msg, |
nothing calls this directly
no test coverage detected