diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2016-10-20 19:36:29 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2016-11-15 19:40:36 +0800 |
commit | dc2e34ddf37cc46e32959a50f03e1d7fe1445630 (patch) | |
tree | 849781cc9b7527258312b66e5bd6ea912c2ea0db /common | |
parent | ef9265d0d7abf6614c1d2fb977989ab0d400a590 (diff) | |
download | go-tangerine-dc2e34ddf37cc46e32959a50f03e1d7fe1445630.tar go-tangerine-dc2e34ddf37cc46e32959a50f03e1d7fe1445630.tar.gz go-tangerine-dc2e34ddf37cc46e32959a50f03e1d7fe1445630.tar.bz2 go-tangerine-dc2e34ddf37cc46e32959a50f03e1d7fe1445630.tar.lz go-tangerine-dc2e34ddf37cc46e32959a50f03e1d7fe1445630.tar.xz go-tangerine-dc2e34ddf37cc46e32959a50f03e1d7fe1445630.tar.zst go-tangerine-dc2e34ddf37cc46e32959a50f03e1d7fe1445630.zip |
core, core/state, trie: Hardfork EIP155, EIP161, EIP170
This commit implements EIP158 part 1, 2, 3 & 4
1. If an account is empty it's no longer written to the trie. An empty
account is defined as (balance=0, nonce=0, storage=0, code=0).
2. Delete an empty account if it's touched
3. An empty account is redefined as either non-existent or empty.
4. Zero value calls and zero value suicides no longer consume the 25k
reation costs.
params: moved core/config to params
Signed-off-by: Jeffrey Wilcke <jeffrey@ethereum.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/registrar/ethreg/api.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/common/registrar/ethreg/api.go b/common/registrar/ethreg/api.go index 6d77a9385..1d0bc811b 100644 --- a/common/registrar/ethreg/api.go +++ b/common/registrar/ethreg/api.go @@ -32,11 +32,12 @@ import ( "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" + "github.com/ethereum/go-ethereum/params" ) // registryAPIBackend is a backend for an Ethereum Registry. type registryAPIBackend struct { - config *core.ChainConfig + config *params.ChainConfig bc *core.BlockChain chainDb ethdb.Database txPool *core.TxPool @@ -45,12 +46,12 @@ type registryAPIBackend struct { // PrivateRegistarAPI offers various functions to access the Ethereum registry. type PrivateRegistarAPI struct { - config *core.ChainConfig + config *params.ChainConfig be *registryAPIBackend } // NewPrivateRegistarAPI creates a new PrivateRegistarAPI instance. -func NewPrivateRegistarAPI(config *core.ChainConfig, bc *core.BlockChain, chainDb ethdb.Database, txPool *core.TxPool, am *accounts.Manager) *PrivateRegistarAPI { +func NewPrivateRegistarAPI(config *params.ChainConfig, bc *core.BlockChain, chainDb ethdb.Database, txPool *core.TxPool, am *accounts.Manager) *PrivateRegistarAPI { return &PrivateRegistarAPI{ config: config, be: ®istryAPIBackend{ |