From c73988416c60fe6c7b206b536cb72c81bbd4af52 Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Fri, 29 Mar 2019 02:38:00 +0100 Subject: [PATCH] rename binary output handle funds better --- Makefile | 2 +- manager/ytsync.go | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index db24e11..e41cb2e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -BINARY=prism-bin +BINARY=ytsync DIR = $(shell cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) BIN_DIR = ${DIR}/bin diff --git a/manager/ytsync.go b/manager/ytsync.go index 24db87c..452b0c0 100644 --- a/manager/ytsync.go +++ b/manager/ytsync.go @@ -620,8 +620,10 @@ func (s *Sync) startWorker(workerNum int) { SendErrorToSlack("something went wrong while waiting for a block: %v", err) break } - } else if strings.Contains(err.Error(), "failed: Not enough funds") || - strings.Contains(err.Error(), "Error in daemon: Insufficient funds, please deposit additional LBC") { + } else if util.SubstringInSlice(err.Error(), []string{ + "Not enough funds to cover this transaction", + "failed: Not enough funds", + "Error in daemon: Insufficient funds, please deposit additional LBC"}) { log.Println("refilling addresses before retrying") err = s.walletSetup() if err != nil {