aboutsummaryrefslogtreecommitdiffstats
path: root/trie
diff options
context:
space:
mode:
authorWenbiao Zheng <delweng@gmail.com>2018-09-03 23:33:21 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-09-03 23:33:21 +0800
commit6a33954731658667056466bf7573ed1c397f4750 (patch)
treed61c7672f1b0f451587efce656b94db3e187c4cc /trie
parent6fc84946203929143c51010e0a10d9fa61fb9b92 (diff)
downloaddexon-6a33954731658667056466bf7573ed1c397f4750.tar
dexon-6a33954731658667056466bf7573ed1c397f4750.tar.gz
dexon-6a33954731658667056466bf7573ed1c397f4750.tar.bz2
dexon-6a33954731658667056466bf7573ed1c397f4750.tar.lz
dexon-6a33954731658667056466bf7573ed1c397f4750.tar.xz
dexon-6a33954731658667056466bf7573ed1c397f4750.tar.zst
dexon-6a33954731658667056466bf7573ed1c397f4750.zip
core, eth, trie: use common/prque (#17508)
Diffstat (limited to 'trie')
-rw-r--r--trie/sync.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/trie/sync.go b/trie/sync.go
index 88d6eb779..67dff5a8b 100644
--- a/trie/sync.go
+++ b/trie/sync.go
@@ -21,8 +21,8 @@ import (
"fmt"
"github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/common/prque"
"github.com/ethereum/go-ethereum/ethdb"
- "gopkg.in/karalabe/cookiejar.v2/collections/prque"
)
// ErrNotRequested is returned by the trie sync when it's requested to process a
@@ -84,7 +84,7 @@ func NewSync(root common.Hash, database DatabaseReader, callback LeafCallback) *
database: database,
membatch: newSyncMemBatch(),
requests: make(map[common.Hash]*request),
- queue: prque.New(),
+ queue: prque.New(nil),
}
ts.AddSubTrie(root, 0, common.Hash{}, callback)
return ts
@@ -242,7 +242,7 @@ func (s *Sync) schedule(req *request) {
return
}
// Schedule the request for future retrieval
- s.queue.Push(req.hash, float32(req.depth))
+ s.queue.Push(req.hash, int64(req.depth))
s.requests[req.hash] = req
}