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 to discover startup flags or command-line options for bitcoind?

Is there any python library could be used to decodescript in output

Lightning network (lnd): What's the best way to report lnd server issues/ask for help with channels that won't close?