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