[#1017] Tweak batch size and scan height (#1018)

this bumps up the amount of blocks to scan on sections of the chain
that have full blocks
Closes #1017
This commit is contained in:
Francisco Gindre 2023-05-02 17:15:39 -03:00 committed by GitHub
parent 58b99c8fb1
commit 505ac6a26c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -90,8 +90,10 @@ extension BlockScannerImpl: BlockScanner {
assert(config.scanningBatchSize > 0, "ZcashSDK.DefaultScanningBatch must be larger than 0!")
guard network == .mainnet else { return UInt32(config.scanningBatchSize) }
if height > 1_600_000 {
return 5
if height > 1_650_000 {
// librustzcash thread saturation at a number of blocks
// that contains 100 * num_cores Sapling outputs.
return UInt32(max(ProcessInfo().activeProcessorCount, 10))
}
return UInt32(config.scanningBatchSize)