3

I am trying to push a raw transaction via BTC insight API, but I always get an error message:

16: bad-txns-vin-empty. Code:-26

Here is the raw transaction hex:

010000000001013920fd5fa5ff9243f96fe11f2ff032dc5842dee09c7992f81441b511ac5584020100000017160014354966a45844090d7152d104326c681ca1075e5effffffff02e8030000000000001976a914e42a54ba2042e889461c7966ac6ba13eeb144a3f88ac905f01000000000017a9148ff360136ee24aa4d5f3ed298947dbc5cfd8ebd58702483045022100c625106241f0b4e90cf4819945d1ff43f2108d9581bbc32f5052c91a28dcc9f5022031760808c4b7ca2b686ef49b9c03d486a2dfea9b85396a7f22914bf3eeeff3800121027a8d1c43339ffddeb722b92189412602720f722ed640a08dcbe7e473e71ca11600000000

2 Answers 2

4

The transaction you're trying to send spends from an segwit input, but BitPay Insight does not currently support segwit. On segwit-supporting software, the transaction is valid:

 $ bitcoin-cli testmempoolaccept '["010000000001013920fd5fa5ff9243f96fe11f2ff032dc5842dee09c7992f81441b511ac5584020100000017160014354966a45844090d7152d104326c681ca1075e5effffffff02e8030000000000001976a914e42a54ba2042e889461c7966ac6ba13eeb144a3f88ac905f01000000000017a9148ff360136ee24aa4d5f3ed298947dbc5cfd8ebd58702483045022100c625106241f0b4e90cf4819945d1ff43f2108d9581bbc32f5052c91a28dcc9f5022031760808c4b7ca2b686ef49b9c03d486a2dfea9b85396a7f22914bf3eeeff3800121027a8d1c43339ffddeb722b92189412602720f722ed640a08dcbe7e473e71ca11600000000"]'
 [
   {
     "txid": "e4fdf857b97f1d41c277ffab61dd1367774311303db982d42f7f80e4baa4105a",
     "allowed": true
   }
]

If you just need your transaction broadcast, feel free to reply to this answer in a comment and I'll send it for you.

1
  • 1
    Tnx for answer.
    – ItsMyLife
    Jun 5, 2018 at 12:50
0

Whatever tool you are using is likely unable to validate segwit transactions, and thus thinks that your inputs are not formed correctly. It's probably just backed by a node that wasn't upgraded (I believe insight does not have a patched version for segwit support yet)

Try using a tool like https://blockchain.info/pushtx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.