Skip to content

Remove lodash from bitcore-p2p#4147

Open
MichaelAJay wants to merge 56 commits intobitpay:masterfrom
MichaelAJay:p2p-rm-lodash
Open

Remove lodash from bitcore-p2p#4147
MichaelAJay wants to merge 56 commits intobitpay:masterfrom
MichaelAJay:p2p-rm-lodash

Conversation

@MichaelAJay
Copy link
Copy Markdown
Contributor

@MichaelAJay MichaelAJay commented Apr 20, 2026

Description

Remove lodash (imported from bitcore-lib) from bitcore-p2p. All strict undefined checks (_.isUndefined(x)) were transitioned to looser nullish checks: x == null.

Changelog

  • Removed all lodash ('_') implementations and replaced with plain JavaScript

The following message paths were exercised on BTC and BCH. The code is similar on Doge, but not exercised.

  • headers
  • inv
  • getdata
  • block
  • tx

The following message paths were not exercised:

  • addr
  • filterload
  • filteradd
  • merkleblock

Testing Notes

Use bitcore-cli to exercise the following:

  • create address: --command address (fund externally)
  • check status: --command status
  • check balance by address: --command balance --showByAddress
  • get history: --command history
  • get utxos: --command utxos
  • send: --command transaction --to <dest> --amount <amt>
  • recheck history and balance as above

Checklist

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

@MichaelAJay MichaelAJay changed the title [WIP] Remove lodash from bitcore-p2p Remove lodash from bitcore-p2p Apr 27, 2026
@MichaelAJay MichaelAJay marked this pull request as ready for review April 27, 2026 14:37
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