sweeper: set sequence to be able to sweep htlc v2 utxo

This commit is contained in:
Andras Banki-Horvath 2020-08-24 20:46:02 +02:00
parent cd0a5f9f06
commit 71a7dec649
No known key found for this signature in database
GPG key ID: 80E5375C094198D8
3 changed files with 7 additions and 5 deletions

View file

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