MCPcopy Create free account
hub / github.com/ElementsProject/lightning / proposal_meets_depth

Function proposal_meets_depth

onchaind/onchaind.c:1152–1191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1150}
1151
1152static 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
1193static void propose_resolution(struct tracked_output *out,
1194 const struct bitcoin_tx *tx,

Callers 2

propose_resolutionFunction · 0.85
tx_new_depthFunction · 0.85

Calls 10

ignore_outputFunction · 0.85
record_external_depositFunction · 0.85
tx_type_nameFunction · 0.85
output_type_nameFunction · 0.85
proposal_is_rbfableFunction · 0.85
type_to_stringClass · 0.50
wire_sync_writeFunction · 0.50

Tested by

no test coverage detected