| 1150 | } |
| 1151 | |
| 1152 | static void proposal_meets_depth(struct tracked_output *out) |
| 1153 | { |
| 1154 | bool is_rbf = false; |
| 1155 | |
| 1156 | /* If we simply wanted to ignore it after some depth */ |
| 1157 | if (!out->proposal->tx) { |
| 1158 | ignore_output(out); |
| 1159 | |
| 1160 | if (out->proposal->tx_type == THEIR_HTLC_TIMEOUT_TO_THEM) |
| 1161 | record_external_deposit(out, out->tx_blockheight, |
| 1162 | HTLC_TIMEOUT); |
| 1163 | |
| 1164 | return; |
| 1165 | } |
| 1166 | |
| 1167 | status_debug("Broadcasting %s (%s) to resolve %s/%s", |
| 1168 | tx_type_name(out->proposal->tx_type), |
| 1169 | type_to_string(tmpctx, struct bitcoin_tx, out->proposal->tx), |
| 1170 | tx_type_name(out->tx_type), |
| 1171 | output_type_name(out->output_type)); |
| 1172 | |
| 1173 | if (out->proposal) |
| 1174 | /* Our own penalty transactions are going to be RBFed. */ |
| 1175 | is_rbf = proposal_is_rbfable(out->proposal); |
| 1176 | |
| 1177 | wire_sync_write( |
| 1178 | REQ_FD, |
| 1179 | take(towire_onchaind_broadcast_tx( |
| 1180 | NULL, out->proposal->tx, |
| 1181 | onchain_txtype_to_wallet_txtype(out->proposal->tx_type), |
| 1182 | is_rbf))); |
| 1183 | |
| 1184 | /* Don't wait for this if we're ignoring the tiny payment. */ |
| 1185 | if (out->proposal->tx_type == IGNORING_TINY_PAYMENT) { |
| 1186 | ignore_output(out); |
| 1187 | record_ignored_wallet_deposit(out); |
| 1188 | } |
| 1189 | |
| 1190 | /* Otherwise we will get a callback when it's in a block. */ |
| 1191 | } |
| 1192 | |
| 1193 | static void propose_resolution(struct tracked_output *out, |
| 1194 | const struct bitcoin_tx *tx, |
no test coverage detected