aboutsummaryrefslogtreecommitdiffstats
path: root/trie/trie.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-10-07 17:14:30 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-10-19 15:03:10 +0800
commitb97e34a8e4d06b315cc495819ba6612f89dec54f (patch)
tree22ddf740ffe180b29b9b5a3a94684d7ac2a5ae19 /trie/trie.go
parentab27bee25a845be90bd60e774ff68d2ea1501772 (diff)
downloaddexon-b97e34a8e4d06b315cc495819ba6612f89dec54f.tar.gz
dexon-b97e34a8e4d06b315cc495819ba6612f89dec54f.tar.zst
dexon-b97e34a8e4d06b315cc495819ba6612f89dec54f.zip
eth/downloader: concurrent receipt and state processing
Diffstat (limited to 'trie/trie.go')
-rw-r--r--trie/trie.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/trie/trie.go b/trie/trie.go
index aa8d39fe2..a3a383fb5 100644
--- a/trie/trie.go
+++ b/trie/trie.go
@@ -24,6 +24,7 @@ import (
"hash"
"github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/crypto/sha3"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/logger/glog"
@@ -35,8 +36,12 @@ const defaultCacheCapacity = 800
var (
// The global cache stores decoded trie nodes by hash as they get loaded.
globalCache = newARC(defaultCacheCapacity)
+
// This is the known root hash of an empty trie.
emptyRoot = common.HexToHash("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421")
+
+ // This is the known hash of an empty state trie entry.
+ emptyState = crypto.Sha3Hash(nil)
)
var ErrMissingRoot = errors.New("missing root node")