-
Notifications
You must be signed in to change notification settings - Fork 57
Description
The behavior of stop_gap when set to 0 is somewhat underspecified. The documentation states that "A stop gap of 0 will be treated as a stop gap of 1", however it has been pointed out that scanning scripts will stop after the first parallel-requests number of requests to esplora regardless of whether the SPK is found to have transaction history, i.e. not what you'd expect if using a stop gap of 1. Possible solutions are to:
1) Remove the doc comment and leave the behavior the same
2) Change the code to internally set stop_gap to the maximum of 1 and the given value
3) If stop gap is 0, then set it to the number of parallel requests
I also think readability here could be improved by changing the variable gap_limit_reached to unused_count as originally suggested by @evanlinjin and then stopping when the count of unused scripts is greater or equal to the stop gap.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status