| 1542 | } |
| 1543 | |
| 1544 | static bool wallet_channels_load_active(struct wallet *w) |
| 1545 | { |
| 1546 | bool ok = true; |
| 1547 | struct db_stmt *stmt; |
| 1548 | int count = 0; |
| 1549 | |
| 1550 | /* We load all channels */ |
| 1551 | stmt = db_prepare_v2(w->db, SQL("SELECT" |
| 1552 | " id" |
| 1553 | ", peer_id" |
| 1554 | ", scid" |
| 1555 | ", full_channel_id" |
| 1556 | ", channel_config_local" |
| 1557 | ", channel_config_remote" |
| 1558 | ", state" |
| 1559 | ", funder" |
| 1560 | ", channel_flags" |
| 1561 | ", minimum_depth" |
| 1562 | ", next_index_local" |
| 1563 | ", next_index_remote" |
| 1564 | ", next_htlc_id" |
| 1565 | ", funding_tx_id" |
| 1566 | ", funding_tx_outnum" |
| 1567 | ", funding_satoshi" |
| 1568 | ", our_funding_satoshi" |
| 1569 | ", funding_locked_remote" |
| 1570 | ", push_msatoshi" |
| 1571 | ", msatoshi_local" |
| 1572 | ", fundingkey_remote" |
| 1573 | ", revocation_basepoint_remote" |
| 1574 | ", payment_basepoint_remote" |
| 1575 | ", htlc_basepoint_remote" |
| 1576 | ", delayed_payment_basepoint_remote" |
| 1577 | ", per_commit_remote" |
| 1578 | ", old_per_commit_remote" |
| 1579 | ", shachain_remote_id" |
| 1580 | ", shutdown_scriptpubkey_remote" |
| 1581 | ", shutdown_keyidx_local" |
| 1582 | ", last_sent_commit_state" |
| 1583 | ", last_sent_commit_id" |
| 1584 | ", last_tx" |
| 1585 | ", last_sig" |
| 1586 | ", last_was_revoke" |
| 1587 | ", first_blocknum" |
| 1588 | ", min_possible_feerate" |
| 1589 | ", max_possible_feerate" |
| 1590 | ", msatoshi_to_us_min" |
| 1591 | ", msatoshi_to_us_max" |
| 1592 | ", future_per_commitment_point" |
| 1593 | ", last_sent_commit" |
| 1594 | ", feerate_base" |
| 1595 | ", feerate_ppm" |
| 1596 | ", remote_upfront_shutdown_script" |
| 1597 | ", local_static_remotekey_start" |
| 1598 | ", remote_static_remotekey_start" |
| 1599 | ", option_anchor_outputs" |
| 1600 | ", shutdown_scriptpubkey_local" |
| 1601 | ", closer" |
no test coverage detected