rm unused
This commit is contained in:
parent
a1729e1add
commit
b249404b47
@ -1,23 +1,11 @@
|
||||
package adapt
|
||||
|
||||
import (
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/params"
|
||||
|
||||
plugeth "github.com/openrelayxyz/plugeth-utils/core"
|
||||
plugeth_params "github.com/openrelayxyz/plugeth-utils/restricted/params"
|
||||
)
|
||||
|
||||
func StateAccount(a *plugeth.StateAccount) *types.StateAccount {
|
||||
return &types.StateAccount{
|
||||
Nonce: a.Nonce,
|
||||
Balance: a.Balance,
|
||||
Root: common.Hash(a.Root),
|
||||
CodeHash: a.CodeHash,
|
||||
}
|
||||
}
|
||||
|
||||
func ChainConfig(cc *plugeth_params.ChainConfig) *params.ChainConfig {
|
||||
return ¶ms.ChainConfig{
|
||||
ChainID: cc.ChainID,
|
||||
|
20
main/main.go
20
main/main.go
@ -78,23 +78,3 @@ func GetAPIs(stack core.Node, backend core.Backend) []core.API {
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// StateUpdate gives us updates about state changes made in each block.
|
||||
// We extract contract code here, since it's not exposed by plugeth's state interfaces.
|
||||
func StateUpdate(
|
||||
blockRoot core.Hash,
|
||||
parentRoot core.Hash,
|
||||
destructs map[core.Hash]struct{},
|
||||
accounts map[core.Hash][]byte,
|
||||
storage map[core.Hash]map[core.Hash][]byte,
|
||||
codeUpdates map[core.Hash][]byte) {
|
||||
if blockchain == nil {
|
||||
log.Warn("StateUpdate called before InitializeNode", "root", blockRoot)
|
||||
return
|
||||
}
|
||||
|
||||
// for hash, code := range codeUpdates {
|
||||
// log.Debug("UPDATING CODE", "hash", hash)
|
||||
// codeStore.Set(hash, code)
|
||||
// }
|
||||
}
|
||||
|
@ -1,28 +0,0 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"github.com/openrelayxyz/plugeth-utils/core"
|
||||
plugeth_types "github.com/openrelayxyz/plugeth-utils/restricted/types"
|
||||
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
)
|
||||
|
||||
type adaptTrieHasher struct {
|
||||
types.TrieHasher
|
||||
}
|
||||
|
||||
func AdaptTrieHasher(th types.TrieHasher) plugeth_types.TrieHasher {
|
||||
return &adaptTrieHasher{th}
|
||||
}
|
||||
|
||||
// TrieHasher is the tool used to calculate the hash of derivable list.
|
||||
// This is internal, do not use.
|
||||
type TrieHasher interface {
|
||||
Reset()
|
||||
Update([]byte, []byte) error
|
||||
Hash() core.Hash
|
||||
}
|
||||
|
||||
func (ath *adaptTrieHasher) Hash() core.Hash {
|
||||
return core.Hash(ath.TrieHasher.Hash())
|
||||
}
|
Loading…
Reference in New Issue
Block a user