From 8aad8d59276fa1cf03fcfcb8ef6bbf9fb7bad6b5 Mon Sep 17 00:00:00 2001 From: vctt94 Date: Tue, 15 Dec 2020 15:02:55 -0300 Subject: [PATCH] lock outpoint on process feetx --- internal/vsp/vsp.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/vsp/vsp.go b/internal/vsp/vsp.go index aec4ca9a9..3dc1f3158 100644 --- a/internal/vsp/vsp.go +++ b/internal/vsp/vsp.go @@ -379,6 +379,10 @@ func (v *VSP) Process(ctx context.Context, ticketHash chainhash.Hash, credits [] if err != nil { return nil, err } + // lock inputs in case they are unlocked. + for _, inp := range feeTx.TxIn { + v.cfg.Wallet.LockOutpoint(&inp.PreviousOutPoint.Hash, inp.PreviousOutPoint.Index) + } err = v.cfg.Wallet.SetPublished(ctx, &feeHash, false) if err != nil { return nil, err