|
|
@ -631,10 +631,16 @@ func generateAccounts(ctx *generatorContext, dl *diskLayer, accMarker []byte) er |
|
|
|
accMarker = nil |
|
|
|
accMarker = nil |
|
|
|
return nil |
|
|
|
return nil |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// Always reset the initial account range as 1 whenever recover from the
|
|
|
|
|
|
|
|
// interruption. TODO(rjl493456442) can we remove it?
|
|
|
|
|
|
|
|
var accountRange = accountCheckRange |
|
|
|
|
|
|
|
if len(accMarker) > 0 { |
|
|
|
|
|
|
|
accountRange = 1 |
|
|
|
|
|
|
|
} |
|
|
|
origin := common.CopyBytes(accMarker) |
|
|
|
origin := common.CopyBytes(accMarker) |
|
|
|
for { |
|
|
|
for { |
|
|
|
id := trie.StateTrieID(dl.root) |
|
|
|
id := trie.StateTrieID(dl.root) |
|
|
|
exhausted, last, err := dl.generateRange(ctx, id, rawdb.SnapshotAccountPrefix, snapAccount, origin, accountCheckRange, onAccount, types.FullAccountRLP) |
|
|
|
exhausted, last, err := dl.generateRange(ctx, id, rawdb.SnapshotAccountPrefix, snapAccount, origin, accountRange, onAccount, types.FullAccountRLP) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return err // The procedure it aborted, either by external signal or internal error.
|
|
|
|
return err // The procedure it aborted, either by external signal or internal error.
|
|
|
|
} |
|
|
|
} |
|
|
@ -646,6 +652,7 @@ func generateAccounts(ctx *generatorContext, dl *diskLayer, accMarker []byte) er |
|
|
|
ctx.removeStorageLeft() |
|
|
|
ctx.removeStorageLeft() |
|
|
|
break |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
accountRange = accountCheckRange |
|
|
|
} |
|
|
|
} |
|
|
|
return nil |
|
|
|
return nil |
|
|
|
} |
|
|
|
} |
|
|
|