Fixed state issue

This commit is contained in:
obscuren
2014-05-20 22:43:59 +02:00
parent 7dae955c1a
commit 64701e388c
2 changed files with 8 additions and 3 deletions

View File

@ -104,6 +104,14 @@ func (c *PStateObject) Nonce() int {
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 {
if c.object != nil {
return len(c.object.Script()) > 0