According to the Bitcoin developers guide, sighash_single signs only the outputs that match the input where the scriptSig is going to be placed. As I see it then, input i should sign only output i. However, the code is always signing the current input with the last output of the transaction.
According to the Bitcoin developers guide, sighash_single signs only the outputs that match the input where the scriptSig is going to be placed. As I see it then, input
i
should sign only outputi
. However, the code is always signing the current input with the last output of the transaction.Am I getting it wrong, or it is actually a bug?