From fd4181d03f7288c86d94c2b117b1561defd5323c Mon Sep 17 00:00:00 2001 From: Martin Boehm Date: Wed, 29 Jan 2020 23:54:20 +0100 Subject: [PATCH] Alter logging of a possible db inconsitency in addresses column --- api/worker.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/api/worker.go b/api/worker.go index e1802cca..6026651f 100644 --- a/api/worker.go +++ b/api/worker.go @@ -181,12 +181,9 @@ func (w *Worker) GetTransactionFromBchainTx(bchainTx *bchain.Tx, height int, spe return nil, errors.Annotatef(err, "txCache.GetTransaction %v", bchainVin.Txid) } // mempool transactions are not in TxAddresses but confirmed should be there, log a problem - if bchainTx.Confirmations > 0 { - inSync, _, _ := w.is.GetSyncState() - // backend can report tx as confirmed, however blockbook is still syncing (!inSync), in this case do not log a problem - if bchainTx.Confirmations != 1 || inSync { - glog.Warning("DB inconsistency: tx ", bchainVin.Txid, ": not found in txAddresses") - } + // ignore when Confirmations==1, it may be just a timing problem + if bchainTx.Confirmations > 1 { + glog.Warning("DB inconsistency: tx ", bchainVin.Txid, ": not found in txAddresses, confirmations ", bchainTx.Confirmations) } if len(otx.Vout) > int(vin.Vout) { vout := &otx.Vout[vin.Vout]