vbuterin / pybitcointools

SImple, common-sense Bitcoin-themed Python ECC library
1.28k stars 856 forks source link

SIGHASH_SINGLE choosing outputs. #149

Closed sr-gi closed 7 years ago

sr-gi commented 7 years ago

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.

Am I getting it wrong, or it is actually a bug?