For what it’s worth i don’t think you can reuse the signature like that. The message being signed by the CHECKSIG
in the scriptSig is different from the message being signed by the CHECKSIG
in the scriptPubKey. This is because EvalScript is called with the scriptSig for the former and with the scriptPubKey for the latter, which is later used as the scriptCode in the CHECKSIG
evaluation.
So, besides the fact that you are using a CHECKSIG
in the scriptSig where i think you meant to use a CHECKSIGVERIFY
, the script you propose would always either fail one of the two CHECKSIG
s and therefore fail execution.
(Interestingly i think you might be able to not duplicate the signature by using some clever CODESEPARATOR
hack so that the scriptCode is the same for both the scriptSig and the scriptPubKey.)