nakamoto icon indicating copy to clipboard operation
nakamoto copied to clipboard

Handle race condition with fast rescan and low gap limit

Open cloudhead opened this issue 3 years ago • 0 comments

It's likely that a fast rescan combined with a normal or low gap limit will miss some blocks. The reason is that the rescan process doesn't pause when a block is matched, and it never backtracks; so if a block is matched at some height H, while the rescan process is at height H+100, and the matched block at H adds more than the gap-limit worth of new scripts, those will be missed between blocks H and H+100.

This was found out by @straylight-orbit

cloudhead avatar Oct 09 '22 08:10 cloudhead