aboutsummaryrefslogtreecommitdiffstats
path: root/ethpub/pub.go
diff options
context:
space:
mode:
authorMaran <maran.hidskes@gmail.com>2014-05-03 02:00:58 +0800
committerMaran <maran.hidskes@gmail.com>2014-05-03 02:00:58 +0800
commit4f20e8f649a19168718a7f0fe7619e3bdb626aa8 (patch)
tree418210e21d26fcb7c9af0eb4c63b30a8c0af7d88 /ethpub/pub.go
parent69d83b1da55a2149a402e7fa66721fd98f580801 (diff)
downloadgo-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.go2
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))