Why is scriptSig filled with scriptPubKey before signing a transaction?

Why is scriptSig filled with scriptPubKey before signing a transaction?

I'm checking the transaction signing as described here Redeeming a raw transaction step by step example required.

What is the reason for steps 5 and 6: temporarily filling scriptSig with scriptPubKey of the output we want to redeem?

Can't this just be skipped, as with txid and output index we uniquely specify the output thus scriptPubKey and we don't get any value with this filling?

http://ift.tt/2BeSHeT

Comments

Popular posts from this blog

How do 'Sphinx' invoice-less payments on the Lightning Network work?

How public key is calculated from a base58 encoded private key?

QUESTION ABOUT SLOW API