deanmlittle / bsv-p2p Goto Github PK
View Code? Open in Web Editor NEWA fork of bitcore-p2p for BitcoinSV with bsv.js compatibility.
License: MIT License
A fork of bitcore-p2p for BitcoinSV with bsv.js compatibility.
License: MIT License
There are some changes from bitcore that seem to be missing from the history. How was the original upload produced? I'm currently running into an issue from this difference:
bitcore-p2p has stop = BufferUtil.NULL_HASH
: https://github.com/bitpay/bitcore-p2p/blob/master/lib/messages/utils.js#L110
but bsv-p2p has stop = Buffer.alloc(1)
: https://github.com/deanmlittle/bsv-p2p/blob/master/lib/messages/utils.js#L112
in bsv-p2p, this unrecorded change causes a crash at https://github.com/deanmlittle/bsv-p2p/blob/master/lib/messages/commands/getheaders.js#L57 where the length is not 32: if (this.stop.length !== 32) { throw new Error('Invalid hash length: ' + this.stop.length); }
Installing bsv-p2p doesn't automatically install the bsv package.
The bitcore-p2p package.json includes bitcore-lib as a dependency whereas bsv-p2p doesn't include bsv as a dependency.
TypeError: JSUtil.integerAsBuffer is not a function
at addNetwork (.\node_modules\bsv-p2p\lib\networks.js:105:28)
at Object. (.\node_modules\bsv-p2p\lib\networks.js:243:1)
Would you consider scoping this package ( https://docs.npmjs.com/cli/v6/using-npm/scope ) so it can be used alongside https://www.npmjs.com/package/bsv-p2p ?
I got this error when I install this package and run my program:
Error: Cannot find module 'lodash'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/some_dir/node_modules/bsv-p2p/lib/networks.js:1:71)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
Should lodash be added to package.json?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.