diff options
author | Wenbiao Zheng <delweng@gmail.com> | 2018-09-03 23:33:21 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2018-09-03 23:33:21 +0800 |
commit | 6a33954731658667056466bf7573ed1c397f4750 (patch) | |
tree | d61c7672f1b0f451587efce656b94db3e187c4cc /trie | |
parent | 6fc84946203929143c51010e0a10d9fa61fb9b92 (diff) | |
download | go-tangerine-6a33954731658667056466bf7573ed1c397f4750.tar go-tangerine-6a33954731658667056466bf7573ed1c397f4750.tar.gz go-tangerine-6a33954731658667056466bf7573ed1c397f4750.tar.bz2 go-tangerine-6a33954731658667056466bf7573ed1c397f4750.tar.lz go-tangerine-6a33954731658667056466bf7573ed1c397f4750.tar.xz go-tangerine-6a33954731658667056466bf7573ed1c397f4750.tar.zst go-tangerine-6a33954731658667056466bf7573ed1c397f4750.zip |
core, eth, trie: use common/prque (#17508)
Diffstat (limited to 'trie')
-rw-r--r-- | trie/sync.go | 6 |
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 } |