aboutsummaryrefslogtreecommitdiff
path: root/core/state/sync.go
diff options
context:
space:
mode:
authorDeterminant <tederminant@gmail.com>2020-09-15 23:55:34 -0400
committerDeterminant <tederminant@gmail.com>2020-09-15 23:55:34 -0400
commit78745551c077bf54151202138c2629f288769561 (patch)
tree2b628e99fd110617089778fa91235ecd2888f4ef /core/state/sync.go
parent7d1388c743b4ec8f4a86bea95bfada785dee83f7 (diff)
WIP: geth-tavum
Diffstat (limited to 'core/state/sync.go')
-rw-r--r--core/state/sync.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/state/sync.go b/core/state/sync.go
index 873395c..1018b78 100644
--- a/core/state/sync.go
+++ b/core/state/sync.go
@@ -19,22 +19,22 @@ package state
import (
"bytes"
- "github.com/ava-labs/go-ethereum/common"
- "github.com/ava-labs/go-ethereum/ethdb"
- "github.com/ava-labs/go-ethereum/rlp"
- "github.com/ava-labs/go-ethereum/trie"
+ "github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/ethdb"
+ "github.com/ethereum/go-ethereum/rlp"
+ "github.com/ethereum/go-ethereum/trie"
)
// NewStateSync create a new state trie download scheduler.
func NewStateSync(root common.Hash, database ethdb.KeyValueReader, bloom *trie.SyncBloom) *trie.Sync {
var syncer *trie.Sync
- callback := func(leaf []byte, parent common.Hash) error {
+ callback := func(path []byte, leaf []byte, parent common.Hash) error {
var obj Account
if err := rlp.Decode(bytes.NewReader(leaf), &obj); err != nil {
return err
}
- syncer.AddSubTrie(obj.Root, 64, parent, nil)
- syncer.AddRawEntry(common.BytesToHash(obj.CodeHash), 64, parent)
+ syncer.AddSubTrie(obj.Root, path, parent, nil)
+ syncer.AddCodeEntry(common.BytesToHash(obj.CodeHash), path, parent)
return nil
}
syncer = trie.NewSync(root, database, callback, bloom)