| 607 | } |
| 608 | |
| 609 | void commit_tx_boost(struct channel *channel, |
| 610 | struct anchor_details *adet, |
| 611 | bool success) |
| 612 | { |
| 613 | enum side side; |
| 614 | |
| 615 | if (!adet) |
| 616 | return; |
| 617 | |
| 618 | /* If it's in our mempool, we should consider boosting it. |
| 619 | * Otherwise, try boosting peers' commitment txs. */ |
| 620 | if (success) |
| 621 | side = LOCAL; |
| 622 | else |
| 623 | side = REMOTE; |
| 624 | |
| 625 | /* Ones we've already launched will use refresh_anchor_spend */ |
| 626 | for (size_t i = 0; i < tal_count(adet->anchors); i++) { |
| 627 | if (adet->anchors[i].commit_side != side) |
| 628 | continue; |
| 629 | if (amount_sat_eq(adet->anchors[i].anchor_spend_fee, |
| 630 | AMOUNT_SAT(0))) { |
| 631 | create_and_broadcast_anchor(channel, &adet->anchors[i]); |
| 632 | } |
| 633 | } |
| 634 | } |
no test coverage detected