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

Unable to send raw transaction: mandatory-script-verify-flag-failed

ETH To The Moon / Bank of England Cryptocurrency? / BTC Dominance / More (The Crypt0 Minute)

My blockchain.info wallet was hacked. How can I create a double send to foil the attacker?