diff options
author | Maran <maran.hidskes@gmail.com> | 2014-05-03 02:00:58 +0800 |
---|---|---|
committer | Maran <maran.hidskes@gmail.com> | 2014-05-03 02:00:58 +0800 |
commit | 4f20e8f649a19168718a7f0fe7619e3bdb626aa8 (patch) | |
tree | 418210e21d26fcb7c9af0eb4c63b30a8c0af7d88 /ethpub/pub.go | |
parent | 69d83b1da55a2149a402e7fa66721fd98f580801 (diff) | |
download | go-tangerine-4f20e8f649a19168718a7f0fe7619e3bdb626aa8.tar go-tangerine-4f20e8f649a19168718a7f0fe7619e3bdb626aa8.tar.gz go-tangerine-4f20e8f649a19168718a7f0fe7619e3bdb626aa8.tar.bz2 go-tangerine-4f20e8f649a19168718a7f0fe7619e3bdb626aa8.tar.lz go-tangerine-4f20e8f649a19168718a7f0fe7619e3bdb626aa8.tar.xz go-tangerine-4f20e8f649a19168718a7f0fe7619e3bdb626aa8.tar.zst go-tangerine-4f20e8f649a19168718a7f0fe7619e3bdb626aa8.zip |
Implemented first few methods via public api
Diffstat (limited to 'ethpub/pub.go')
-rw-r--r-- | ethpub/pub.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ethpub/pub.go b/ethpub/pub.go index c6f177124..3c579001e 100644 --- a/ethpub/pub.go +++ b/ethpub/pub.go @@ -87,7 +87,7 @@ func (lib *PEthereum) createTx(key, recipient, valueStr, gasStr, gasPriceStr, in tx = ethchain.NewContractCreationTx(value, gas, gasPrice, mainScript, initScript) } else { // Just in case it was submitted as a 0x prefixed string - if initStr[0:2] == "0x" { + if len(initStr) > 0 && initStr[0:2] == "0x" { initStr = initStr[2:len(initStr)] } tx = ethchain.NewTransactionMessage(hash, value, gas, gasPrice, ethutil.FromHex(initStr)) |