Unable to sendrawtransaction

0 votes

I'm creating a raw transaction the following way.

multichain-cli chain1 createrawtransaction '[{"txid":"1aa04efdf2b5d4b7b1832e124dc9c9c13b35bee764083166beb7d75c1e57a5ce","vout":0}]' '{"1Hkkz3pCNNHcvMsC9gqjFyE33B1EiVFqjVrT7g":{"asset1":2.0}}'   

returns tx hexstring

multichain-cli chain1 signrawtransaction [ tx hexstring]

multichain-cli chain1 sendrawtransaction [ tx hexstring]

{"method":"sendrawtransaction","params":["0100000001cea5571e5cd7b7be66310864e7be353bc1c9c94d122e83b1b7d4b5f2fd4ea01a0000000000ffffffff0100000000000000003176a9147bf707c2e0523276d2f5045c97ed8a04f69b438088ac1673706b71640000000a0100001709c8000000000000007500000000"],"id":1,"chain_name":"

chain1"}

I get error: {"code":-26,"message":"64: Nonstandard transaction input"}

 

I can't find what the problem is here. The txID i'm using as input for this new transaction is just a normal transaction of asset1 between 2 wallets. Any ideas on why this might be happening?

 

Thanks!

asked Dec 28, 2015 by Nico

1 Answer

0 votes
 
Best answer

You need to pass the output of signrawtransaction as the input to sendrawtransaction, rather than the same input to both of them. The signrawtransaction call adds the signatures into the input transaction hex string and outputs the signed transaction as a result. You cannot send an unsigned transaction.

answered Dec 28, 2015 by MultiChain
...