I've been playing with raw transactions and signed transaction and I've noticed that the error "Mandatory script verify flag failed" comes in two variations.
- script failed on OP_EQUALVERIFY OP
- Script evaluated without error but finished with a false/empty top stack element.
Now, it appears that error number one is given whenever I try to send a transaction with the wrong TXID or index number. The second error can appear when I provide the wrong signature.
But aren't both errors just variant of a failure in executing the OP_EQUALVERIFY? At what step of the evaluation each error is thrown and what can we make out of it?
I'll highly appreciate any pointer you might have. I really struggle here to differentiate the two.