| 132 | }; |
| 133 | |
| 134 | static struct tx_state *new_tx_state(const tal_t *ctx) |
| 135 | { |
| 136 | struct tx_state *tx_state = tal(ctx, struct tx_state); |
| 137 | tx_state->psbt = NULL; |
| 138 | tx_state->remote_funding_sigs_rcvd = false; |
| 139 | tx_state->local_funding_sigs_sent = false; |
| 140 | tx_state->has_commitments = false; |
| 141 | |
| 142 | tx_state->lease_expiry = 0; |
| 143 | tx_state->lease_fee = AMOUNT_SAT(0); |
| 144 | tx_state->blockheight = 0; |
| 145 | tx_state->lease_commit_sig = NULL; |
| 146 | tx_state->lease_chan_max_msat = 0; |
| 147 | tx_state->lease_chan_max_ppt = 0; |
| 148 | |
| 149 | /* no max_htlc_dust_exposure on remoteconf, we exclusively use the local's */ |
| 150 | tx_state->remoteconf.max_dust_htlc_exposure_msat = AMOUNT_MSAT(0); |
| 151 | |
| 152 | for (size_t i = 0; i < NUM_TX_MSGS; i++) |
| 153 | tx_state->tx_msg_count[i] = 0; |
| 154 | |
| 155 | return tx_state; |
| 156 | } |
| 157 | |
| 158 | /* Global state structure. This is only for the one specific peer and channel */ |
| 159 | struct state { |
no outgoing calls
no test coverage detected