Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop

Conflicts:
	accounts/account_manager.go
This commit is contained in:
obscuren
2015-02-26 11:16:01 +01:00
21 changed files with 277 additions and 119 deletions

33
xeth/state.go Normal file
View File

@ -0,0 +1,33 @@
package xeth
import "github.com/ethereum/go-ethereum/state"
type State struct {
xeth *XEth
state *state.StateDB
}
func NewState(xeth *XEth, statedb *state.StateDB) *State {
return &State{xeth, statedb}
}
func (self *State) State() *state.StateDB {
return self.state
}
func (self *State) Get(addr string) *Object {
return &Object{self.state.GetStateObject(fromHex(addr))}
}
func (self *State) SafeGet(addr string) *Object {
return &Object{self.safeGet(addr)}
}
func (self *State) safeGet(addr string) *state.StateObject {
object := self.state.GetStateObject(fromHex(addr))
if object == nil {
object = state.NewStateObject(fromHex(addr), self.xeth.eth.Db())
}
return object
}