File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,10 @@ func (c *anchorResolver) Launch() error {
202202 // an output that we want to sweep only if it is economical to do so.
203203 //
204204 // An exclusive group is not necessary anymore, because we know that
205- // this is the only anchor that can be swept.
205+ // this is the only anchor that can be swept. However, to avoid this
206+ // anchor input being group with other inputs, we still keep the
207+ // exclusive group here such that the anchor will be swept
208+ // independently.
206209 //
207210 // We also clear the parent tx information for cpfp, because the
208211 // commitment tx is confirmed.
@@ -222,6 +225,8 @@ func (c *anchorResolver) Launch() error {
222225 c .broadcastHeight , nil ,
223226 )
224227
228+ exclusiveGroup := c .ShortChanID .ToUint64 ()
229+
225230 resultChan , err := c .Sweeper .SweepInput (
226231 & anchorInput ,
227232 sweep.Params {
@@ -233,6 +238,10 @@ func (c *anchorResolver) Launch() error {
233238 // There's no rush to sweep the anchor, so we use a nil
234239 // deadline here.
235240 DeadlineHeight : fn .None [int32 ](),
241+
242+ // Use the chan id as the exclusive group. This prevents
243+ // any of the anchors from being batched together.
244+ ExclusiveGroup : & exclusiveGroup ,
236245 },
237246 )
238247
Original file line number Diff line number Diff line change 4545
4646// Params contains the parameters that control the sweeping process.
4747type Params struct {
48- // ExclusiveGroup is an identifier that, if set, prevents other inputs
49- // with the same identifier from being batched together.
48+ // ExclusiveGroup is an identifier that, if set, ensures this input is
49+ // swept in a transaction by itself, and not batched with any other
50+ // inputs.
5051 ExclusiveGroup * uint64
5152
5253 // DeadlineHeight specifies an absolute block height that this input
You can’t perform that action at this time.
0 commit comments