|
|
@ -21,7 +21,7 @@ type Sweeper struct {
|
|
|
|
|
|
|
|
|
|
|
|
// CreateSweepTx creates an htlc sweep tx.
|
|
|
|
// CreateSweepTx creates an htlc sweep tx.
|
|
|
|
func (s *Sweeper) CreateSweepTx(
|
|
|
|
func (s *Sweeper) CreateSweepTx(
|
|
|
|
globalCtx context.Context, height int32,
|
|
|
|
globalCtx context.Context, height int32, sequence uint32,
|
|
|
|
htlc *swap.Htlc, htlcOutpoint wire.OutPoint,
|
|
|
|
htlc *swap.Htlc, htlcOutpoint wire.OutPoint,
|
|
|
|
keyBytes [33]byte,
|
|
|
|
keyBytes [33]byte,
|
|
|
|
witnessFunc func(sig []byte) (wire.TxWitness, error),
|
|
|
|
witnessFunc func(sig []byte) (wire.TxWitness, error),
|
|
|
@ -37,6 +37,7 @@ func (s *Sweeper) CreateSweepTx(
|
|
|
|
sweepTx.AddTxIn(&wire.TxIn{
|
|
|
|
sweepTx.AddTxIn(&wire.TxIn{
|
|
|
|
PreviousOutPoint: htlcOutpoint,
|
|
|
|
PreviousOutPoint: htlcOutpoint,
|
|
|
|
SignatureScript: htlc.SigScript,
|
|
|
|
SignatureScript: htlc.SigScript,
|
|
|
|
|
|
|
|
Sequence: sequence,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
// Add output for the destination address.
|
|
|
|
// Add output for the destination address.
|
|
|
|