Commit Graph

69 Commits

Author SHA1 Message Date
Braydon Fuller
6007dc6faf updated to use mapped constructers and removed build method 2015-03-13 20:49:24 -04:00
Braydon Fuller
97f39db081 added tests for pool _addConnectedPeer 2015-03-13 15:05:08 -04:00
Braydon Fuller
3b53593288 added tests for pool.listen and improved arguments for tx and block messages 2015-03-13 14:50:17 -04:00
Braydon Fuller
8c9babc093 added tests for command edge cases 2015-03-13 13:45:51 -04:00
Braydon Fuller
a8b8c59069 added default options for all command messages, and added tests 2015-03-13 12:50:55 -04:00
Braydon Fuller
6461748cd5 make listening optional and fixed peer test 2015-03-12 18:52:31 -04:00
Braydon Fuller
608e41de07 added test coverage for peer 2015-03-12 01:12:45 -04:00
Braydon Fuller
1dfe7091b4 added test for pool.sendMessage 2015-03-12 00:48:05 -04:00
Braydon Fuller
d63c1171db added test for inventory fromBufferReader 2015-03-12 00:37:15 -04:00
Braydon Fuller
11bee8b900 Improved API:
- Renamed "Commands" to "builder"
- "Messages.parseMessage" to "Messages.parseBuffer"
- Changed to use private methods for "discardUntilNextMessage" and "buildFromBuffer"
- Cleaned up tests
2015-03-11 23:57:08 -04:00
Braydon Fuller
e8f0725081 Moved commands, message and messages to directory 2015-03-11 23:57:08 -04:00
Braydon Fuller
0b20724288 Changed options for Pool 2015-03-11 23:57:08 -04:00
Braydon Fuller
9a813bad96 Extensibility
- changed options in constructors
- define block and transaction constructors for block and tx messages
2015-03-11 23:57:00 -04:00
Braydon Fuller
6a3b2d0c83 added tests for commands 2015-03-04 09:55:13 -05:00
William Wolf
d6b89176f2 MerkleBlock Tests 2015-02-26 08:39:56 -08:00
Manuel Aráoz
88d3a5a351 Merge pull request #39 from throughnothing/filter-messages
Add FilterLoad, FilterAdd, and FilterClear Messages
2015-02-19 16:48:25 -03:00
Braydon Fuller
e579182e6d Increased test coverage for Pool 2015-02-18 20:25:03 -05:00
William Wolf
d751e583b4 Remove 'size' from pool Test 2015-02-18 16:26:12 -08:00
Braydon Fuller
4781694038 Added jsdocs for options and changed size to maxSize 2015-02-18 19:06:04 -05:00
William Wolf
63ad4e5438 Propogate 'relay' from Pool() to its Peer()s 2015-02-18 13:04:30 -08:00
William Wolf
05e5c37230 The 'fRelay' param on Version requests is optional.
I'v seen `RangeError: index out of range` crashes from nodes that don't
send it, when `bitcore-p2p` tries to `readUInt8()` the last bit.

This also adds `relay` property to `Peer` objects that is respected
when sending `Version` messages.
2015-02-18 11:21:01 -08:00
Manuel Aráoz
872dc52c63 Merge pull request #38 from throughnothing/peerconnect-event
Add 'peerconnect' event from Pool
2015-02-18 13:35:08 -03:00
Braydon Fuller
c07bc0461d Changed discover option to dnsSeed for clarity and added comments to documentation for the options. 2015-02-18 09:15:44 -05:00
Braydon Fuller
3d6f591ea9 Added a few more tests for buffer serialization with bitcoin core test data 2015-02-16 21:28:39 -05:00
William Wolf
abbe63666f Add FilterLoad, FilterAdd, and FilterClear Messages + BloomFilter 2015-02-16 18:15:42 -08:00
William Wolf
e0b58e25d6 Add 'peerconnect' event from Pool 2015-02-16 14:39:54 -08:00
Braydon Fuller
ae97e36ff0 Added configuration option to only connect to trusted peers. 2015-02-16 13:18:11 -05:00
Manuel Araoz
b9c90613fa remove lodash 2015-02-11 18:26:27 -03:00
Manuel Araoz
c62409c4bc increase test coverage 2015-02-06 17:54:24 -03:00
Manuel Araoz
ee4ef8ebaf all tests passing! 2015-02-06 16:41:05 -03:00
Manuel Araoz
24b02ccaa6 fix #1018 2015-02-06 12:32:52 -03:00
Manuel Araoz
c8674a8633 working on fixing Version 2015-02-04 17:42:03 -03:00
Manuel Araoz
17e890996e add GetData unit data, and more integration tests 2015-02-03 13:07:14 -03:00
Manuel Araoz
e5fb2bba31 add data and tests for getheaders 2015-02-02 18:23:26 -03:00
Manuel Araoz
cc7b58369b add unit tests for NotFound 2015-02-02 16:18:10 -03:00
Manuel Araoz
1937abac11 move bitcoind tests to separate folder 2015-01-30 17:30:39 -03:00
Manuel Araoz
98990dbc82 new bitcoind integration tests 2015-01-30 16:37:14 -03:00
Manuel Araoz
77e399cf1a remove only 2015-01-28 17:50:33 -03:00
Manuel Araoz
cdd34bf8df add tests for more messages 2015-01-28 17:50:14 -03:00
Manuel Araoz
eaca92b1c6 refactor message#fromBuffer() 2015-01-27 16:29:34 -03:00
Manuel Araoz
ce7ccc773e remove browser checks 2015-01-27 13:20:39 -03:00
Manuel Araoz
aeec0ddfda fix a test 2015-01-27 13:19:08 -03:00
Manuel Araoz
89cee5804f polish tests 2015-01-27 13:16:50 -03:00
Braydon Fuller
21bf8f34ff Fixed issue with block message test
- See: https://github.com/bitpay/bitcore/pull/938
2015-01-21 10:42:32 -05:00
Esteban Ordano
aa2552629e Add integration test with network data 2015-01-20 12:48:48 -03:00
Esteban Ordano
6550bba657 Fix test for version 2015-01-20 11:17:29 -03:00
Esteban Ordano
6fc5e75868 Change from bitcore-base to bitcore 2015-01-15 18:31:42 -05:00
Esteban Ordano
ff3963b410 Move to gulp-bitcore 2015-01-15 18:30:06 -05:00
Esteban Ordano
1863a6547b Initial commit for bitcore-p2p 2015-01-15 18:30:06 -05:00
Braydon Fuller
4dbfb7eeba Moved files from lib/transport to lib, and test/transport to test 2015-01-15 18:06:56 -05:00