OSDN Git Service

p2p: refactor switch code and add test (#1538)
authoryahtoo <yahtoo.ma@gmail.com>
Mon, 18 Feb 2019 07:44:03 +0000 (15:44 +0800)
committerPaladz <yzhu101@uottawa.ca>
Mon, 18 Feb 2019 07:44:03 +0000 (15:44 +0800)
commite100f975c5a4d7551b49beb646fb213b97db6bcf
tree313b458c44500b19336e17785e1a0f007a18ed2a
parentbb495cb39695b3f39c5d5d556ab0746884fc1461
p2p: refactor switch code and add test (#1538)

* p2p: refactor switch code and add test

* Adjust parameter position

* Resolve merging conflicts

* Fix test fail

* Resolve merging conflicts

* Fix review bugs

* Fix review bugs

* Fix review bug

* Fix review bug
17 files changed:
api/api.go
api/nodeinfo.go
cmd/bytomd/commands/run_node.go
netsync/handle.go
node/node.go
p2p/discover/dns_seeds.go [moved from p2p/dns_seeds.go with 97% similarity]
p2p/discover/dns_seeds_test.go [moved from p2p/dns_seeds_test.go with 99% similarity]
p2p/discover/net.go
p2p/discover/udp.go
p2p/listener.go
p2p/listener_test.go
p2p/node_info.go
p2p/peer.go
p2p/peer_test.go [new file with mode: 0644]
p2p/switch.go
p2p/switch_test.go [new file with mode: 0644]
p2p/test_util.go