sendrawtransaction giving error code -26

+2 votes

While sending the final signed hex to the sendrawtransaction API it outputs me this error message with error code 26:

16: ConnectInputs failed: mandatory-script-verify-flag-failed (Script evaluated without error but finished with a false/empty top stack element) can someone explain me why I am not getting final transaction id instead of this error message? 

asked Dec 28, 2018 by adarshajha

2 Answers

–1 vote
How are you building the transactions to be sent? For debugging purposes I would recommend building the same transaction using MultiChain's APIs, and then comparing the two to see the difference. That should give a clue as to the problem.
answered Dec 28, 2018 by MultiChain
for multisig wallet i am using signraw transaction and passing both private keys in an array , can it be a possible reason for this ?
it's a multisig wallet of 3by 2. i am able to do the transaction using one private key but from other private key it throws error code -26. can you please see it, as i am using it for my project and it was my choice to use multichain for a zero transaction fee blockchain environment.
+1 vote
It seems your raw transaction is completely wrong. Just pushing OP_TRUE to the stack does not make any output spendable; you still need to execute the output script. The combined script (input script and output script together) results in a failure/OP_FALSE so the input is invalid. Thus the transaction seems invalid.

It must be the case that you are trying to spend from a p2sh address, so unless you have all the required no of keys, you can't spend from that output.
answered Dec 29, 2018 by gimmick
@multichain team please help , what is this ? no support on this ?
We already answered you above?
@multichain team i solved it
...