From fc97aca1b9576a1a56a29d65084edf5195df8221 Mon Sep 17 00:00:00 2001 From: Brian Stafford Date: Sun, 27 Oct 2024 18:25:05 -0500 Subject: [PATCH] increase tx history query buffer --- client/asset/zec/zec.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/asset/zec/zec.go b/client/asset/zec/zec.go index e1e4bb329b..bd68bb57d1 100644 --- a/client/asset/zec/zec.go +++ b/client/asset/zec/zec.go @@ -3346,7 +3346,8 @@ func (w *zecWallet) idUnknownTx(tx *btcjson.ListTransactionsResult) (*asset.Wall func (w *zecWallet) addUnknownTransactionsToHistory(tip uint64) { txHistoryDB := w.txDB() - const blockQueryBuffer = 3 + // Zcash has a maximum reorg length of 100 blocks. + const blockQueryBuffer = 100 var blockToQuery uint64 lastQuery := w.receiveTxLastQuery.Load() if lastQuery == 0 { @@ -3421,6 +3422,10 @@ func (w *zecWallet) syncTxHistory(tip uint64) { txHistoryDB := w.txDB() if txHistoryDB == nil { + // It's actually impossible to get here, because we error and return + // early in Connect if startTxHistoryDB returns an error, but we'll + // log this for good measure anyway. + w.log.Error("Transaction history database was not initialized") return }