mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-25 18:21:12 +02:00
cnct: reuse sweep tx logic for commit resolver
Removes duplicate sweep tx code from commit resolver and delegates generation to UtxoSweeper in the sweep package.
This commit is contained in:
@@ -3,6 +3,7 @@ package contractcourt
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/lightningnetwork/lnd/sweep"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
||||
@@ -130,6 +131,9 @@ type ChainArbitratorConfig struct {
|
||||
// DisableChannel disables a channel, resulting in it not being able to
|
||||
// forward payments.
|
||||
DisableChannel func(wire.OutPoint) error
|
||||
|
||||
// Sweeper allows resolvers to sweep their final outputs.
|
||||
Sweeper *sweep.UtxoSweeper
|
||||
}
|
||||
|
||||
// ChainArbitrator is a sub-system that oversees the on-chain resolution of all
|
||||
|
Reference in New Issue
Block a user