decred / dcrwallet

A secure Decred wallet daemon written in Go (golang).
https://decred.org
ISC License
211 stars 153 forks source link

Batch rescan database updates #2344

Closed jrick closed 2 months ago

jrick commented 3 months ago

RPC rescans were performing batching of 2000 blocks at a time, but separate database updates would occur for each block that contained any matching transactions. To improve rescan performance, batch the update using a background goroutine worker when the total amount of transactions exceeds a value (currently untuned, but I observe significant rescan times with a first try guess of 256).