Bump default address gap limit to 100, add log indicating we didn't find funds in the last addressBatchSize addresses (#4201)

This commit is contained in:
Chris Stewart 2022-03-19 19:02:32 -05:00 committed by GitHub
parent 3c2ecd555f
commit 5475a994cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 5 deletions

View file

@ -87,7 +87,7 @@ trait NeutrinoWalletApi { self: WalletApi =>
addressBatchSize = addressBatchSize,
useCreationTime = false)
def discoveryBatchSize(): Int = 25
def discoveryBatchSize(): Int
}

View file

@ -115,7 +115,7 @@ bitcoin-s {
bloomFalsePositiveRate = 0.0001 # percentage
addressGapLimit = 20
addressGapLimit = 100
discoveryBatchSize = 100

View file

@ -224,8 +224,15 @@ bitcoin-s {
bloomFalsePositiveRate = 0.0001 # percentage
addressGapLimit = 20
# the number of consecutive addresses that we do not
# discover funds in before we mark as rescan as exhausted
# this is needed because we can never truely tell how many addresses
# the wallet has used when executing a rescan from a seed
addressGapLimit = 100
# the number of addresses that get generated everytime
# we need to rescan. If a match occurs within the addressGapLimit
# we generate another discoveryBatchSize addresses and then rescan again
discoveryBatchSize = 100
requiredConfirmations = 6

View file

@ -156,7 +156,8 @@ private[wallet] trait RescanHandling extends WalletLogger {
if (
externalGap >= walletConfig.addressGapLimit && changeGap >= walletConfig.addressGapLimit
) {
//done rescanning
logger.info(
s"Did not find any funds within the last ${walletConfig.addressGapLimit} addresses. Stopping our rescan.")
Future.unit
} else {
logger.info(