-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: No, this would invalidate signatures #503
Comments
Are you trying add output to signed tx (fully or partially)? |
I dont think so. I add only before sign. Is it possible that this will happen before sign? Moreover, I will properly debug my code today and let you know.
|
@adityapatadia this only occurs when a signature already exists, and the SIGHASH type is incompatible. |
@dcousens BTW, why condition is return (input.hashType & 0x1f) === Transaction.SIGHASH_SINGLE As I understand should be: return (input.hashType & 0x1f) === Transaction.SIGHASH_SINGLE ||
(input.hashType & 0x1f) === Transaction.SIGHASH_NONE |
Indeed. |
@fanatid could you make a new issue? |
Resolved in #504 |
Thanks for the fast fix but I also confirm that it happened for me because of my code. tx object was not properly initialised which caused this error (I did not write 'var' in front of tx object while defining it which made it global object and hence problems). |
No worries @adityapatadia, thanks for reporting the issue any way 👍 |
I am getting following error
Error: No, this would invalidate signatures
at TransactionBuilder.addOutput (node_modules/bitcoinjs-lib/src/transaction_builder.js:236:21)
Can't trace its root. Can someone help me here?
The text was updated successfully, but these errors were encountered: