Commit Graph

71 Commits

Author SHA1 Message Date
NIC619
b4bd997932
Fix mypy 2019-12-17 17:49:49 +08:00
NIC619
65766ec9ac
Change type of local peers var from list to set 2019-12-17 17:36:15 +08:00
NIC619
f1d58ef8ff
Change type of peers from list to set:
`peers_gossipsub`, `peers_floodsub` and mesh/fanout peers
2019-12-17 17:30:24 +08:00
NIC619
7d6daa8e10
Minor cleanup:
- remove outdated comment
- add new peer at the end
- turn peers to send from list to set
2019-12-17 17:17:03 +08:00
NIC Lin
a675da52ee
Update libp2p/pubsub/gossipsub.py
Co-Authored-By: Kevin Mai-Husan Chia <mhchia@users.noreply.github.com>
2019-12-07 15:46:42 +08:00
NIC619
2d3bfc8184
Apply PR feedback:
use defaultdict and init control message
2019-12-06 23:42:31 +08:00
NIC619
db0017ddbb
Fix lint after applying suggestion 2019-12-05 17:33:07 +08:00
NIC Lin
b4900d53da
Apply suggestions from code review
Co-Authored-By: Chih Cheng Liang <chihchengliang@gmail.com>
2019-12-05 15:21:09 +08:00
NIC619
67f02c512a
Remove unnecessary check and fix test 2019-12-05 15:10:04 +08:00
NIC619
e6813da5f5
Refactor _get_peers_to_send 2019-12-05 14:35:34 +08:00
NIC619
c08b2375e1
Fix: should not remove topic if no peers 2019-12-03 23:10:47 +08:00
NIC619
a9abf1e3dd
Fix list deletion and add list remove check 2019-12-03 22:37:49 +08:00
NIC619
bb15c817b1
Fix var access before assignment 2019-12-03 22:14:45 +08:00
NIC619
ea6cd30a16
Add back some comment and TODO. Add comment to tests 2019-12-03 18:45:33 +08:00
NIC619
5efdf4c703
Group messages for peer in heartbeat 2019-12-03 15:48:23 +08:00
NIC619
ab1500c708
Remove unneccessary check in gossip heartbeat 2019-12-03 15:03:06 +08:00
NIC619
920cf646ef
Fix lint and add check in fanout heartbeat 2019-12-02 22:49:27 +08:00
NIC619
a7e0c5d737
Add missing cleanup in gossipsub remove_peer 2019-12-02 22:41:49 +08:00
NIC619
357341e0d8
Remove unneccessary filter and check in gossipsub 2019-12-02 22:40:35 +08:00
NIC619
c2d88962c7
Add gossipsub heartbeat_initial_delay 2019-12-02 16:55:16 +08:00
NIC619
0672f5ae6d
Fix: move heartbeat delay to heartbeat 2019-12-02 16:38:48 +08:00
NIC619
50fd0acf41
Cleanup outdated TODOs in gossipsub 2019-11-30 20:19:17 +08:00
NIC619
e355cb2600
Apply PR feedback:
Only use pop method if error handling is in place
2019-11-23 16:04:22 +08:00
NIC619
501eef59de
Apply PR feedback:
Only use pop method if graceful failure handling is desired
2019-11-21 14:48:03 +08:00
NIC619
19907e18ec
Replace (check and) del pattern with pop method 2019-11-20 23:06:37 +08:00
NIC619
ace5ef69a8
Apply PR feedback:
handle pubsub dead peer when stream closed in gossipsub
2019-11-16 17:03:04 +08:00
NIC619
ccc7879422
Add stream.write error handling in gossipsub 2019-11-16 16:57:11 +08:00
NIC619
9be9b4bbfc
Handle StreamClosed in pub/gossip/flood-sub 2019-11-16 16:56:59 +08:00
Dominik Muhs
bafdd8512d Enforce pre-summary newline in docstrings 2019-10-24 20:10:45 +02:00
Dominik Muhs
eef505f2d9 Add automatic docstring formatter and apply 2019-10-24 08:41:10 +02:00
Moshe Malawach
986a852e7e Remove forced debug level 2019-10-01 11:17:05 +02:00
NIC619
9bad7a61f0
Add some loggings to pubsub 2019-09-14 21:54:26 +08:00
mhchia
0e3d4508d6
PR feedback
- Use `Sequence` instead of `List`
- Add note
- Remove redundant words in docstring
2019-09-04 20:52:18 +08:00
mhchia
7f20ab781d
Fix gosssipsub tests 2019-09-03 23:37:34 +08:00
mhchia
33dae87c35
Add pubsub test for gossipsub 2019-09-03 16:07:44 +08:00
mhchia
1b5d064a8d
Add utility functions for libp2p bindings
To prepare for pubsub interop test
2019-09-02 14:30:25 +08:00
mhchia
4358a4bc89
Negotiate multiselect version for Muxer
`MuxerMultistream` is introduced to negotiate `Multiselect` version
before negotiating Multiplexer's version. This is required by
multistream 1.x
2019-08-21 11:43:24 +08:00
Alex Stokes
3debd2c808
Run black and isort w/ the new config 2019-08-13 14:36:42 -07:00
Chih Cheng Liang
28f6de37ee
Fix the rest of the typing hints (#232)
* ignore kad

* fix swarm, and minor

* fix init and swarm

* ignore pb

* enable mypy

* fix basic host

* fix tcp

* fix mplex

* add typing for pb

* skip format pyi

* [mypy] no need to ignore pb now

* add typing to chat
2019-08-11 16:47:54 +08:00
Alex Stokes
7477b29508 run black w/ extended line length 2019-08-04 12:37:41 +08:00
Alex Stokes
c8005c8113 Run isort in repo 2019-08-03 17:50:14 +08:00
mhchia
2e94fcf56c
Remove pylint:disable 2019-08-02 23:26:06 +08:00
NIC619
924e965537
Change argument name of Network.listen and blakc format 2019-08-02 14:45:59 +08:00
NIC619
cd684aad9e
Update peer_id to type peer.ID in pubsub folder 2019-08-02 14:45:23 +08:00
NIC619
b928bdb356
Convert from base58/pubkey/privkey to class method 2019-08-02 14:42:10 +08:00
Alex Stokes
0ae9840928
Run black over repo 2019-07-31 15:00:12 -07:00
NIC619
5e215901c0
Apply PR feedback 2019-07-30 23:41:28 +08:00
NIC619
c4105688d1
Fix after rebase 2019-07-30 17:31:08 +08:00
NIC619
2d4e23cfe2
Fix cyclic import and lint 2019-07-30 16:28:05 +08:00
NIC619
a4a0d79f6d
Improve import layout 2019-07-30 16:27:29 +08:00