aboutsummaryrefslogtreecommitdiffstats
path: root/chain
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-10-31 21:45:03 +0800
committerobscuren <geffobscura@gmail.com>2014-10-31 21:45:03 +0800
commitaf34749a6b47ff8f9b4cb55d9ea65e1235d63b68 (patch)
treed7b244bf5076cd6a56df626d97249b3264d92a86 /chain
parentaf8f5f0b69f1c359991d12c7708804fe8dd1f944 (diff)
downloaddexon-af34749a6b47ff8f9b4cb55d9ea65e1235d63b68.tar.gz
dexon-af34749a6b47ff8f9b4cb55d9ea65e1235d63b68.tar.zst
dexon-af34749a6b47ff8f9b4cb55d9ea65e1235d63b68.zip
ethtrie => trie
Diffstat (limited to 'chain')
-rw-r--r--chain/block.go8
-rw-r--r--chain/derive_sha.go4
2 files changed, 6 insertions, 6 deletions
diff --git a/chain/block.go b/chain/block.go
index 7e39aa2c9..16975a2fe 100644
--- a/chain/block.go
+++ b/chain/block.go
@@ -8,9 +8,9 @@ import (
"time"
"github.com/ethereum/go-ethereum/crypto"
- "github.com/ethereum/go-ethereum/ethtrie"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/state"
+ "github.com/ethereum/go-ethereum/trie"
)
type BlockInfo struct {
@@ -137,7 +137,7 @@ func CreateBlock(root interface{},
}
block.SetUncles([]*Block{})
- block.state = state.New(ethtrie.New(ethutil.Config.Db, root))
+ block.state = state.New(trie.New(ethutil.Config.Db, root))
return block
}
@@ -294,7 +294,7 @@ func (self *Block) setHeader(header *ethutil.Value) {
self.PrevHash = header.Get(0).Bytes()
self.UncleSha = header.Get(1).Bytes()
self.Coinbase = header.Get(2).Bytes()
- self.state = state.New(ethtrie.New(ethutil.Config.Db, header.Get(3).Val))
+ self.state = state.New(trie.New(ethutil.Config.Db, header.Get(3).Val))
self.TxSha = header.Get(4).Bytes()
self.ReceiptSha = header.Get(5).Bytes()
self.LogsBloom = header.Get(6).Bytes()
@@ -315,7 +315,7 @@ func NewUncleBlockFromValue(header *ethutil.Value) *Block {
return block
}
-func (block *Block) Trie() *ethtrie.Trie {
+func (block *Block) Trie() *trie.Trie {
return block.state.Trie
}
diff --git a/chain/derive_sha.go b/chain/derive_sha.go
index 92db90d95..4246aeb02 100644
--- a/chain/derive_sha.go
+++ b/chain/derive_sha.go
@@ -1,8 +1,8 @@
package chain
import (
- "github.com/ethereum/go-ethereum/ethtrie"
"github.com/ethereum/go-ethereum/ethutil"
+ "github.com/ethereum/go-ethereum/trie"
)
type DerivableList interface {
@@ -11,7 +11,7 @@ type DerivableList interface {
}
func DeriveSha(list DerivableList) []byte {
- trie := ethtrie.New(ethutil.Config.Db, "")
+ trie := trie.New(ethutil.Config.Db, "")
for i := 0; i < list.Len(); i++ {
trie.Update(string(ethutil.NewValue(i).Encode()), string(list.GetRlp(i)))
}