Skip to content

Lib Fixes: Copy and Paste Bugs - #4222

Open
MicahMaphet wants to merge 3 commits into
bitpay:masterfrom
MicahMaphet:bch-segwit-fix
Open

Lib Fixes: Copy and Paste Bugs#4222
MicahMaphet wants to merge 3 commits into
bitpay:masterfrom
MicahMaphet:bch-segwit-fix

Conversation

@MicahMaphet

@MicahMaphet MicahMaphet commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Description 📝

Bug fixes and linting for libs. The main bug was bitcore-lib-cash calling segwit functions causing errors. The others errors are sparse and documented in the Changelog.

Motivation

For #4194 I need to add utxos to a bitcore-lib-cash transaction using associateInputs, but doing so throws an error because the inputs are checked for being a witness when BCH does not have SegWit. Ths PR removes those checks. I used Opus 5 to find similar errors copy and paste.

Changelog 🗒️

  • add a minute to the lib tests to bitcore-lib passes
  • bitcore-lib-cash: Remove witness script type handling (isWitnessScriptHashOut/isWitnessPublicKeyHashOut) from transaction input classification
  • bitcore-lib-cash: Fix error message referencing bitcore-lib instead of bitcore-lib-cash
  • bitcore-lib-cash: Fix SEQUENCE_LOCKTIME_DISABLE_FLAG reference (missing Interpreter. qualifier) in interpreter
  • bitcore-lib, bitcore-lib-doge, bitcore-lib-ltc: Replace invalid trailing comma with semicolon on SCRIPT_VERIFY_CLEANSTACK flag definition
  • bitcore-lib: Refactor output.js internal branch tracking to use _branch/_isValid consistently and fix validity check
  • bitcore-lib-ltc: Remove unreachable bech32prefix assignment in networks.js
  • libs: Rename crypto variable to nodeCrypto in hash.js to stop shadowing the Node built-in global
  • libs: linting errors on the affected files — indentation, import ordering, semicolons, unreachable break statements, var redeclarations, and this-aliasing in script interpreters

Testing Notes 🥼

No significant functional changes so tests should catch everything


Checklist ✔️

  • I have read CONTRIBUTING.md and verified that this PR follows the guidelines and requirements outlined in it.

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.

1 participant