Alter logging of a possible db inconsitency in addresses column
parent
47173774f6
commit
fd4181d03f
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue