Fix limit = 0 (unlimited) (#731)

This commit is contained in:
Andrew Ashikhmin 2020-07-09 17:08:26 +02:00 committed by GitHub
parent 686f186545
commit bae2e7094a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,7 +78,7 @@ func (l *progressLogger) Stop() {
}
func SpawnExecuteBlocksStage(s *StageState, stateDB ethdb.Database, blockchain BlockChain, limit uint64, quit <-chan struct{}, dests vm.Cache, writeReceipts bool) error {
if limit <= s.BlockNumber {
if limit > 0 && limit <= s.BlockNumber {
s.Done()
return nil
}