Merge branch 'hotfix/3'
This commit is contained in:
commit
47fd4833ee
|
@ -61,9 +61,6 @@ func (s *State) GetStateObject(addr []byte) *StateObject {
|
||||||
cachedStateObject := s.states[string(addr)]
|
cachedStateObject := s.states[string(addr)]
|
||||||
if cachedStateObject != nil {
|
if cachedStateObject != nil {
|
||||||
stateObject.state = cachedStateObject
|
stateObject.state = cachedStateObject
|
||||||
} else {
|
|
||||||
// If it isn't cached, cache the state
|
|
||||||
s.states[string(addr)] = stateObject.state
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return stateObject
|
return stateObject
|
||||||
|
|
|
@ -104,6 +104,14 @@ func (c *PStateObject) Nonce() int {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *PStateObject) Root() string {
|
||||||
|
if c.object != nil {
|
||||||
|
return ethutil.Hex(ethutil.NewValue(c.object.State().Root()).Bytes())
|
||||||
|
}
|
||||||
|
|
||||||
|
return "<err>"
|
||||||
|
}
|
||||||
|
|
||||||
func (c *PStateObject) IsContract() bool {
|
func (c *PStateObject) IsContract() bool {
|
||||||
if c.object != nil {
|
if c.object != nil {
|
||||||
return len(c.object.Script()) > 0
|
return len(c.object.Script()) > 0
|
||||||
|
|
Loading…
Reference in New Issue