Skip to content
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

Update v6 branch: Add stripWitness to Transaction Issue 2169 #2170 #2171

Conversation

JacksonDMiller
Copy link
Contributor

This PR aligns the v6 branch with the recent changes to master.

This PR is intended to solve issue 2169

  • Adds a method to the transaction object to remove witness data.
    • This is needed to construct a coinbase transaction with properly formatted inputs.
  • Adds a test to cover the new method.

prevOutScripts.length !== this.ins.length
) {
throw new Error('Must supply prevout script and value for all inputs');
stripWitnesses() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@junderw I wasn't sure what to do with these changes. Should I just not commit the build changes?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be a version diff.

Wipe node_modules and install deps using npm ci and it should be correct. (That's what CI does)

I think master has a newer version of the formatter and maybe your local node_modules still had that newer version (whereas CI will pull the older version).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then just run npm run format && npm run build and it should give you only the diff in your js similar to the ts, and a new function for the d.ts types file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, yeah, that makes complete sense. Sorry, I'm a bit rusty.

@junderw
Copy link
Member

junderw commented Oct 1, 2024

Also, remove the audit CI job and the better-npm-audit dev dependency. (We got rid of it)

@JacksonDMiller
Copy link
Contributor Author

Also, remove the audit CI job and the better-npm-audit dev dependency. (We got rid of it)

Done. I'd be happy to make a separate PR for this if you want, but it seems pretty safe.

@junderw junderw merged commit 0c38a66 into bitcoinjs:v6 Oct 1, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants