How to correctly sign a transaction? Error: 64: scriptsig-not-pushonly
I sent a transaction with far too low fee and it's stuck in mempool.
I'm trying to do a double-spend with a higher fee without any luck.
My wallet: 15Zz2KP5iA7oVarmtmBvb9ZHUmQaSFL9M8
Unconfirmed transaction: 0b0177688485922027b336c24e765fdea8dc03d2ad79f87019705f2ca9fb970a
I'm using coinb.in to create, sign and broadcast transaction but I get Error: 64: scriptsig-not-pushonly.
The transaction seems to be valid when I verify it.
Can anyone point my in the right direction for this?
Top Answer/Comment:
You are building an incorrect scriptSig.
Notice that, if you check the scriptSig of every input from the transaction you provided, it looks like:
76a914321d6a0077ddadfcce3d68d302d866ce81405eba88ac
Which has the following structure:
OP_DUP OP_HASH160 <20-byte-hash> OP_EQUALVERIFY OP_CHECKSIG
However, this is not what is expected to be found in a scriptSig, but what will be expected in the scriptPubKey field.
What you have to do is provide the correct script in the scriptSig field of each input of the transaction, that would correspond to the signature of the transaction if you are creating a P2PKH transaction, or the script that matches with the script-hash from the UTXO you are spending, in case you are building a P2SH transaction.
상단 광고의 [X] 버튼을 누르면 내용이 보입니다