all: fix rename breakage
This commit is contained in:
@ -3,10 +3,10 @@ package ar
|
||||
import (
|
||||
"math/big"
|
||||
|
||||
"github.com/ethereum/go-ethereum/ethtrie"
|
||||
"github.com/ethereum/go-ethereum/trie"
|
||||
)
|
||||
|
||||
type Block interface {
|
||||
Trie() *ethtrie.Trie
|
||||
Trie() *trie.Trie
|
||||
Diff() *big.Int
|
||||
}
|
||||
|
@ -6,17 +6,17 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/ethereum/go-ethereum/ethdb"
|
||||
"github.com/ethereum/go-ethereum/ethtrie"
|
||||
"github.com/ethereum/go-ethereum/trie"
|
||||
)
|
||||
|
||||
type TestBlock struct {
|
||||
trie *ethtrie.Trie
|
||||
trie *trie.Trie
|
||||
}
|
||||
|
||||
func NewTestBlock() *TestBlock {
|
||||
db, _ := ethdb.NewMemDatabase()
|
||||
return &TestBlock{
|
||||
trie: ethtrie.New(db, ""),
|
||||
trie: trie.New(db, ""),
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ func (self *TestBlock) Diff() *big.Int {
|
||||
return b(10)
|
||||
}
|
||||
|
||||
func (self *TestBlock) Trie() *ethtrie.Trie {
|
||||
func (self *TestBlock) Trie() *trie.Trie {
|
||||
return self.trie
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@ package ar
|
||||
import (
|
||||
"math/big"
|
||||
|
||||
"github.com/ethereum/go-ethereum/ethcrypto"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/ethutil"
|
||||
)
|
||||
|
||||
@ -21,16 +21,16 @@ func (self ByteNode) Big() *big.Int {
|
||||
|
||||
func Sha3(v interface{}) *big.Int {
|
||||
if b, ok := v.(*big.Int); ok {
|
||||
return ethutil.BigD(ethcrypto.Sha3(b.Bytes()))
|
||||
return ethutil.BigD(crypto.Sha3(b.Bytes()))
|
||||
} else if b, ok := v.([]interface{}); ok {
|
||||
return ethutil.BigD(ethcrypto.Sha3(ethutil.Encode(b)))
|
||||
return ethutil.BigD(crypto.Sha3(ethutil.Encode(b)))
|
||||
} else if s, ok := v.([]*big.Int); ok {
|
||||
v := make([]interface{}, len(s))
|
||||
for i, b := range s {
|
||||
v[i] = b
|
||||
}
|
||||
|
||||
return ethutil.BigD(ethcrypto.Sha3(ethutil.Encode(v)))
|
||||
return ethutil.BigD(crypto.Sha3(ethutil.Encode(v)))
|
||||
}
|
||||
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user