diff options
author | obscuren <geffobscura@gmail.com> | 2014-05-21 04:43:59 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-05-21 04:43:59 +0800 |
commit | 64701e388c3f603a4fad5b6ff45ba2633b3f645e (patch) | |
tree | 4ac7be0f58dfb37c8302277673ab2b4cb79a01ac /ethpub | |
parent | 7dae955c1a66792bd345c24bace22b69cff8f8a9 (diff) | |
download | dexon-64701e388c3f603a4fad5b6ff45ba2633b3f645e.tar dexon-64701e388c3f603a4fad5b6ff45ba2633b3f645e.tar.gz dexon-64701e388c3f603a4fad5b6ff45ba2633b3f645e.tar.bz2 dexon-64701e388c3f603a4fad5b6ff45ba2633b3f645e.tar.lz dexon-64701e388c3f603a4fad5b6ff45ba2633b3f645e.tar.xz dexon-64701e388c3f603a4fad5b6ff45ba2633b3f645e.tar.zst dexon-64701e388c3f603a4fad5b6ff45ba2633b3f645e.zip |
Fixed state issue
Diffstat (limited to 'ethpub')
-rw-r--r-- | ethpub/types.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ethpub/types.go b/ethpub/types.go index 5d3bfcaaa..77cca78b9 100644 --- a/ethpub/types.go +++ b/ethpub/types.go @@ -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 |