Canonical contract creation

This commit is contained in:
obscuren
2014-05-22 18:24:04 +02:00
parent cc8464ce80
commit 281559d427
5 changed files with 28 additions and 17 deletions

View File

@ -141,7 +141,9 @@ func (lib *PEthereum) createTx(key, recipient, valueStr, gasStr, gasPriceStr, in
}
}
tx = ethchain.NewContractCreationTx(value, gas, gasPrice, mainScript, initScript)
script := ethchain.AppendScript(initScript, mainScript)
tx = ethchain.NewContractCreationTx(value, gas, gasPrice, script)
} else {
// Just in case it was submitted as a 0x prefixed string
if len(initStr) > 0 && initStr[0:2] == "0x" {