diff options
author | obscuren <geffobscura@gmail.com> | 2014-06-12 03:51:21 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-06-12 03:51:21 +0800 |
commit | 9ff97a98a7449f10db71be88146c5a03d932c373 (patch) | |
tree | ca71c5b7d0825c2969f635134d7b06b104e60ae5 /ethpub | |
parent | d8339fa29a884516166993a6d29caed59f32ca1b (diff) | |
download | go-tangerine-9ff97a98a7449f10db71be88146c5a03d932c373.tar go-tangerine-9ff97a98a7449f10db71be88146c5a03d932c373.tar.gz go-tangerine-9ff97a98a7449f10db71be88146c5a03d932c373.tar.bz2 go-tangerine-9ff97a98a7449f10db71be88146c5a03d932c373.tar.lz go-tangerine-9ff97a98a7449f10db71be88146c5a03d932c373.tar.xz go-tangerine-9ff97a98a7449f10db71be88146c5a03d932c373.tar.zst go-tangerine-9ff97a98a7449f10db71be88146c5a03d932c373.zip |
Namereg lookup fix
Diffstat (limited to 'ethpub')
-rw-r--r-- | ethpub/pub.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ethpub/pub.go b/ethpub/pub.go index e00bd0dbe..51426adc5 100644 --- a/ethpub/pub.go +++ b/ethpub/pub.go @@ -115,9 +115,13 @@ var namereg = ethutil.FromHex("bb5f186604d057c1c5240ca2ae0f6430138ac010") func GetAddressFromNameReg(stateManager *ethchain.StateManager, name string) []byte { recp := new(big.Int).SetBytes([]byte(name)) object := stateManager.CurrentState().GetStateObject(namereg) - reg := object.GetStorage(recp) + if object != nil { + reg := object.GetStorage(recp) - return reg.Bytes() + return reg.Bytes() + } + + return nil } func (lib *PEthereum) createTx(key, recipient, valueStr, gasStr, gasPriceStr, scriptStr string) (*PReceipt, error) { |