Post
Topic
Board Bitcoin Technical Support
Merits 1 from 1 user
Topic OP
Bitcoin Core won't send Tx (but testnet will) Error: scriptpubkey (code -26)
by
FractalEncrypt
on 09/01/2021, 03:10:15 UTC
⭐ Merited by ETFbitcoin (1)
I have created a transaction with some null data and it sends fine on testnet, but on mainnet I am getting and error scriptpubkey (code -26)

I did some searching this seems to be an error for a non-standard transaction, but I don't see anything in the Debug log showing why the error.

Using Bitcoin Core QT GUI Console 0.20.1
Windows 10

This is the Transaction template

Code:
createrawtransaction \
'[{"txid": "txid1", "vout": vout1},
{"txid": "txid2", "vout": vout2},
{"txid": "txid3", "vout": vout3},
{"txid": "txid4", "vout": vout4}]' \
'{"address1": Amount,
"address2": Amount,
"address3": Amount,
"address4": Amount,
"data": ""}'

This is the data I want to include
492c204672616374616c456e6372797074206365727469667920746861742074686520426974636 f696e2046756c6c204e6f6465205363756c707475726520342e3020776173206372656174656420 6f6e204a616e7561727920332c203230323120746f20636f6d6d656d6f726174652074686520313 2207965617220616e6e6976657273617279206f66205361746f736869206d696e696e6720746865 2047656e6573697320426c6f636b2e205468697320434f41207761732063726561746564206f6e2 04a616e7561727920382c203230323120746f20636f6d6d656d6f726174652074686520616e6e69 76657273617279206f6620746865206d696e696e67206f6620426c6f636b20312e0a

Here's the testnet transaction with this data included
https://live.blockcypher.com/btc-testnet/tx/04e4a0d8cdaba44bf34525d361b15e7ffdc69d2e12f4f3d3b3e1ae0e31b394ed/