aboutsummaryrefslogtreecommitdiffstats
path: root/core/state
diff options
context:
space:
mode:
authorgary rong <garyrong0905@gmail.com>2019-04-25 22:59:48 +0800
committerPéter Szilágyi <peterke@gmail.com>2019-05-16 15:39:32 +0800
commit80469bea0cc6dbfae749d944094a7c2357dc050d (patch)
treefb70ce428df4a6b5b49dbd83cacca388555d51b5 /core/state
parentb6cac42e9ffc0b19a1e70416db85593f1cb0d30c (diff)
downloadgo-tangerine-80469bea0cc6dbfae749d944094a7c2357dc050d.tar
go-tangerine-80469bea0cc6dbfae749d944094a7c2357dc050d.tar.gz
go-tangerine-80469bea0cc6dbfae749d944094a7c2357dc050d.tar.bz2
go-tangerine-80469bea0cc6dbfae749d944094a7c2357dc050d.tar.lz
go-tangerine-80469bea0cc6dbfae749d944094a7c2357dc050d.tar.xz
go-tangerine-80469bea0cc6dbfae749d944094a7c2357dc050d.tar.zst
go-tangerine-80469bea0cc6dbfae749d944094a7c2357dc050d.zip
all: integrate the freezer with fast sync
* all: freezer style syncing core, eth, les, light: clean up freezer relative APIs core, eth, les, trie, ethdb, light: clean a bit core, eth, les, light: add unit tests core, light: rewrite setHead function core, eth: fix downloader unit tests core: add receipt chain insertion test core: use constant instead of hardcoding table name core: fix rollback core: fix setHead core/rawdb: remove canonical block first and then iterate side chain core/rawdb, ethdb: add hasAncient interface eth/downloader: calculate ancient limit via cht first core, eth, ethdb: lots of fixes * eth/downloader: print ancient disable log only for fast sync
Diffstat (limited to 'core/state')
-rw-r--r--core/state/database.go2
-rw-r--r--core/state/sync.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/state/database.go b/core/state/database.go
index 8798b7380..ecc2c134d 100644
--- a/core/state/database.go
+++ b/core/state/database.go
@@ -93,7 +93,7 @@ type Trie interface {
// If the trie does not contain a value for key, the returned proof contains all
// nodes of the longest existing prefix of the key (at least the root), ending
// with the node that proves the absence of the key.
- Prove(key []byte, fromLevel uint, proofDb ethdb.Writer) error
+ Prove(key []byte, fromLevel uint, proofDb ethdb.KeyValueWriter) error
}
// NewDatabase creates a backing store for state. The returned database is safe for
diff --git a/core/state/sync.go b/core/state/sync.go
index e4a08d293..ef7930527 100644
--- a/core/state/sync.go
+++ b/core/state/sync.go
@@ -26,7 +26,7 @@ import (
)
// NewStateSync create a new state trie download scheduler.
-func NewStateSync(root common.Hash, database ethdb.Reader, bloom *trie.SyncBloom) *trie.Sync {
+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 {
var obj Account