We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b006ae5 commit 08a049bCopy full SHA for 08a049b
cmd/migration-checker/main.go
@@ -186,7 +186,7 @@ func loadMPT(mptTrie *trie.SecureTrie, top bool) chan []kv {
186
if !top {
187
workers = 1 << 3
188
}
189
- step := byte(0xFF) / byte(workers)
+ step := byte(256 / workers)
190
191
mptLeafs := make([]kv, 0, 1000)
192
var mptLeafMutex sync.Mutex
@@ -196,12 +196,12 @@ func loadMPT(mptTrie *trie.SecureTrie, top bool) chan []kv {
196
startKey[0] = byte(i) * step
197
trieIt := trie.NewIterator(mptTrie.NodeIterator(startKey))
198
199
- stopKey := byte(i+1) * step
+ stopKey := (i + 1) * int(step)
200
mptWg.Add(1)
201
go func() {
202
defer mptWg.Done()
203
for trieIt.Next() {
204
- if trieIt.Key[0] >= stopKey {
+ if int(trieIt.Key[0]) >= stopKey {
205
break
206
207
0 commit comments