File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ func loadMPT(mptTrie *trie.SecureTrie, top bool) chan []kv {
186
186
if ! top {
187
187
workers = 1 << 3
188
188
}
189
- step := byte (0xFF ) / byte ( workers )
189
+ step := byte (256 / workers )
190
190
191
191
mptLeafs := make ([]kv , 0 , 1000 )
192
192
var mptLeafMutex sync.Mutex
@@ -196,12 +196,12 @@ func loadMPT(mptTrie *trie.SecureTrie, top bool) chan []kv {
196
196
startKey [0 ] = byte (i ) * step
197
197
trieIt := trie .NewIterator (mptTrie .NodeIterator (startKey ))
198
198
199
- stopKey := byte ( i + 1 ) * step
199
+ stopKey := ( i + 1 ) * int ( step )
200
200
mptWg .Add (1 )
201
201
go func () {
202
202
defer mptWg .Done ()
203
203
for trieIt .Next () {
204
- if trieIt .Key [0 ] >= stopKey {
204
+ if int ( trieIt .Key [0 ]) >= stopKey {
205
205
break
206
206
}
207
207
You can’t perform that action at this time.
0 commit comments