possible bug #399
Closed
ellacodecamp
started this conversation in
General
Replies: 1 comment
-
Yes, this seems a bug, see issue #402 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I was looking at your code and noticed that when you call sign() function from Transaction.sign() you do not pass hash_type around. Instead, the constructor of the Signature class just appends default value SIGHASH_ALL to Signature._der_encoded. I suspect that this is a bug as the real hash_type that was used to create txid that is passed to sign function might be different than SIGHASH_ALL. In SEGWIT case, I think you should be able to extract this information from the last byte in txid and pass it as an argument to the constructor.
Please, let me know what you think.
Ella
Beta Was this translation helpful? Give feedback.
All reactions