Skip to content

Commit 1c1bcfb

Browse files
committed
[release-v1.8] vsp: Dont ignore locked wallet errs
Users should be warned if an error is caused by a locked wallet so they can remediate the problem. VSP fee payments may be missed if these errors are suppressed, and the tickets won't be voted. Partial backport of 2c0284a
1 parent e71decb commit 1c1bcfb

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

internal/vsp/feepayment.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,9 @@ func (c *Client) feePayment(ctx context.Context, ticketHash *chainhash.Hash, pai
248248
log.Errorf("%v is not a ticket: %v", ticketHash, err)
249249
return nil
250250
}
251-
// Try to access the voting key, ignore error unless the wallet is
252-
// locked.
251+
// Try to access the voting key.
253252
fp.votingKey, err = w.DumpWIFPrivateKey(ctx, fp.votingAddr)
254-
if err != nil && !errors.Is(err, errors.Locked) {
253+
if err != nil {
255254
log.Errorf("no voting key for ticket %v: %v", ticketHash, err)
256255
return nil
257256
}
@@ -865,11 +864,10 @@ func (fp *feePayment) confirmPayment() (err error) {
865864
}()
866865

867866
status, err := fp.client.status(ctx, &fp.ticketHash)
868-
// Suppress log if the wallet is currently locked.
869-
if err != nil && !errors.Is(err, errors.Locked) {
870-
log.Warnf("Rescheduling status check for %v: %v", &fp.ticketHash, err)
871-
}
872867
if err != nil {
868+
869+
log.Warnf("Rescheduling status check for %v: %v", &fp.ticketHash, err)
870+
873871
// Stop processing if the status check cannot be performed, but
874872
// a significant amount of confirmations are observed on the fee
875873
// transaction.

0 commit comments

Comments
 (0)