I have created a raw transaction and am now trying to push the hex format into testnet3. I have used following two ways and both are giving me two different errors, first one:
curl -d '{"hex":"TX_HASH"}' http://tbtc.blockr.io/api/v1/tx/push
I get this error:
{"status":"fail","data":"Could not push your transaction!","code":500,"message":"Did you sign your transaction?"}
and second one using this link:
https://test.webbtc.com/relay_tx
gives me this error:
Testnet3 - Error - Request took too long.
Not sure if signature is really the problem here. I used decode api from blockr.io to check my message - it seems well formed and is 226 bytes in length. I played around with fee wondering if that was an issue, but I think i have ruled that out as well.
I have also checked the validity of signature in the code (inspired by David De Rosa's guide). Any tips on how can I verify the validity of my transaction?
Thanks.
Edit: Now I am getting this very descriptive error message from blockr:
{"status":"error","data":"NULL","message":"It's looking like you may have taken a wrong turn. Don't worry... it happens to the best of us.","code":404}
Wish these guys didn't employ their sense of humour in error messages :(
used blockcypher api to push the raw transaction. This is the error message I get:
Error sending transaction: Error running script for input 0 referencing 87ce205d61e4bf63c0bcc42db1a58c36a2cac0048df32e470f3dc1bd39741367 at 0: Script was NOT verified successfully..
After signing the transaction, I checked for signature verification using ECDSA_verify(0,digest, sizeof(digest), sig, sig_len, key)
and this function call returns 1
- So I assumed my signature is correct. Am I wrong in assuming this? Am I missing something big here?