Skip to content

Commit

Permalink
increase tx history query buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
buck54321 committed Oct 27, 2024
1 parent 017099c commit fc97aca
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/asset/zec/zec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit fc97aca

Please sign in to comment.