From cff147bb95d01e532da5898dbf1dc7b23ea6adae Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Wed, 18 Dec 2019 20:24:50 +0100 Subject: [PATCH] work around missing inputs error --- manager/ytsync.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/manager/ytsync.go b/manager/ytsync.go index 077b0c0..777712b 100644 --- a/manager/ytsync.go +++ b/manager/ytsync.go @@ -878,8 +878,10 @@ func (s *Sync) startWorker(workerNum int) { if util.SubstringInSlice(err.Error(), errorsNoRetry) { log.Println("This error should not be retried at all") } else if tryCount < s.MaxTries { - if strings.Contains(err.Error(), "txn-mempool-conflict") || - strings.Contains(err.Error(), "too-long-mempool-chain") { + if util.SubstringInSlice(err.Error(), []string{ + "txn-mempool-conflict", + "too-long-mempool-chain", + }) { log.Println("waiting for a block before retrying") err := s.waitForNewBlock() if err != nil { @@ -891,6 +893,7 @@ func (s *Sync) startWorker(workerNum int) { "Not enough funds to cover this transaction", "failed: Not enough funds", "Error in daemon: Insufficient funds, please deposit additional LBC", + "Missing inputs", }) { log.Println("checking funds and UTXOs before retrying...") err := s.walletSetup()