ethstate.NewState => ethstate.New

This commit is contained in:
obscuren
2014-08-04 10:42:40 +02:00
parent 3debeb7236
commit 03ce15df4c
5 changed files with 12 additions and 11 deletions

View File

@@ -100,7 +100,7 @@ func CreateBlock(root interface{},
}
block.SetUncles([]*Block{})
block.state = ethstate.NewState(ethtrie.New(ethutil.Config.Db, root))
block.state = ethstate.New(ethtrie.New(ethutil.Config.Db, root))
return block
}
@@ -265,7 +265,7 @@ func (block *Block) RlpValueDecode(decoder *ethutil.Value) {
block.PrevHash = header.Get(0).Bytes()
block.UncleSha = header.Get(1).Bytes()
block.Coinbase = header.Get(2).Bytes()
block.state = ethstate.NewState(ethtrie.New(ethutil.Config.Db, header.Get(3).Val))
block.state = ethstate.New(ethtrie.New(ethutil.Config.Db, header.Get(3).Val))
block.TxSha = header.Get(4).Bytes()
block.Difficulty = header.Get(5).BigInt()
block.Number = header.Get(6).BigInt()
@@ -307,7 +307,7 @@ func NewUncleBlockFromValue(header *ethutil.Value) *Block {
block.PrevHash = header.Get(0).Bytes()
block.UncleSha = header.Get(1).Bytes()
block.Coinbase = header.Get(2).Bytes()
block.state = ethstate.NewState(ethtrie.New(ethutil.Config.Db, header.Get(3).Val))
block.state = ethstate.New(ethtrie.New(ethutil.Config.Db, header.Get(3).Val))
block.TxSha = header.Get(4).Bytes()
block.Difficulty = header.Get(5).BigInt()
block.Number = header.Get(6).BigInt()

View File

@@ -278,7 +278,7 @@ func MakeContract(tx *Transaction, state *ethstate.State) *ethstate.StateObject
contract := state.NewStateObject(addr)
contract.InitCode = tx.Data
contract.State = ethstate.NewState(ethtrie.New(ethutil.Config.Db, ""))
contract.State = ethstate.New(ethtrie.New(ethutil.Config.Db, ""))
return contract
}