Skip to content

Commit

Permalink
Merge pull request ethereum#58 from etclabscore/fix/chain-config-pref…
Browse files Browse the repository at this point in the history
…er-feature-eip161f

Fix/chain config prefer feature eip161f
  • Loading branch information
meowsbits authored Nov 22, 2019
2 parents 3bd0edd + ee2d852 commit 6cc44fa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
4 changes: 2 additions & 2 deletions core/blockchain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1424,9 +1424,9 @@ func TestEIP161AccountRemoval(t *testing.T) {
Config: &params.ChainConfig{
ChainID: big.NewInt(1),
HomesteadBlock: new(big.Int),
EIP155Block: new(big.Int),
EIP150Block: new(big.Int),
EIP158Block: big.NewInt(2),
EIP155Block: new(big.Int),
EIP161FBlock: big.NewInt(2),
},
Alloc: GenesisAlloc{address: {Balance: funds}},
}
Expand Down
5 changes: 0 additions & 5 deletions params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -650,11 +650,6 @@ func (c *ChainConfig) IsEIP150(num *big.Int) bool {
return isForked(c.EIP150Block, num)
}

// ISEIP185 returns whether num is either equal to the EIP158 fork block or greater.
func (c *ChainConfig) IsEIP158(num *big.Int) bool {
return isForked(c.EIP158Block, num)
}

// IsEIP155 returns whether num is either equal to the EIP155 fork block or greater.
func (c *ChainConfig) IsEIP155(num *big.Int) bool {
return isForked(c.EIP155Block, num)
Expand Down
4 changes: 2 additions & 2 deletions tests/state_test_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,15 @@ func (t *StateTest) RunNoVerify(subtest StateSubtest, vmconfig vm.Config) (*stat
statedb.RevertToSnapshot(snapshot)
}
// Commit block
statedb.Commit(config.IsEIP158(block.Number()))
statedb.Commit(config.IsEIP161F(block.Number()))
// Add 0-value mining reward. This only makes a difference in the cases
// where
// - the coinbase suicided, or
// - there are only 'bad' transactions, which aren't executed. In those cases,
// the coinbase gets no txfee, so isn't created, and thus needs to be touched
statedb.AddBalance(block.Coinbase(), new(big.Int))
// And _now_ get the state root
root := statedb.IntermediateRoot(config.IsEIP158(block.Number()))
root := statedb.IntermediateRoot(config.IsEIP161F(block.Number()))
return statedb, root, nil
}

Expand Down

0 comments on commit 6cc44fa

Please sign in to comment.