Title: transaction failed to validate input Post by: glacial_boy on August 14, 2018, 09:17:50 AM Hello,
Im owner of this btc testnet address mxsdtqnL3trUZcuqniHJ3G5DXKeNKBQ3Td If I want to spend this output https://testnet.blockchain.info/tx/984d6478625df41d675a39d908f5147348b07fe2f0828c5866af3aca438d29aa (https://testnet.blockchain.info/tx/984d6478625df41d675a39d908f5147348b07fe2f0828c5866af3aca438d29aa), how can I sign it to be valid? This unspent output is of type pay-to-pubkey Thank you Title: Re: transaction failed to validate input Post by: bob123 on August 14, 2018, 09:57:07 AM Which wallet/client/library are you using to create the transaction ?
Are you trying to manually sign it ? For manually signing transactions (and a small python code snippet), look here: https://bitcoin.stackexchange.com/questions/36440/signing-a-raw-transaction-with-python-ecdsa-or-openssl (https://bitcoin.stackexchange.com/questions/36440/signing-a-raw-transaction-with-python-ecdsa-or-openssl) Title: Re: transaction failed to validate input Post by: glacial_boy on August 14, 2018, 10:02:05 AM Im doing a manual sign, code written in Golang with library https://github.com/btcsuite/btcd (https://github.com/btcsuite/btcd)
As for unspent output with type of P2PKH, I managed to create transaction and broadcast successfully. I tried to apply same technique for P2PK but it didnt work Title: Re: transaction failed to validate input Post by: bob123 on August 14, 2018, 10:07:12 AM It would be way more easier for us to find your mistake if you would share the relevant code.
Can't tell much without looking at it. But generally speaking, you seem to have built the transaction wrong. Title: Re: transaction failed to validate input Post by: glacial_boy on August 14, 2018, 10:11:30 AM Code: func CreateTransaction(secret, sender, destination string, amount int64, txHash string) (*wire.MsgTx, error) { This is my function to create a transaction written in Go. Thank you and really appreciate for your help :D |