neoneo-go/pkg/network
Roman Khimov 006337b1f8 network: rework discovery with rwmutex, add test
Keeping run() as the owner of all maps would mean adding at least three more
channels to keep address getters with thread-safety. But then there also is a
race between requestToWork() and run() which is way harder to solve with
channels because there are lots of possibilities for deadlocks. So rework all
of this with good old mutexes.

While at it, fix `requestCh` handling in the inner select of run, it will waste
one loop to handle it, so we should add one to the `requested`.

Fixes #445.
2019-10-28 13:37:27 +03:00
..
payload fix spelling and godoc comments 2019-10-22 17:56:03 +03:00
blockqueue.go network: add block queue 2019-09-27 13:00:09 +03:00
blockqueue_test.go network: add block queue 2019-09-27 13:00:09 +03:00
discovery.go network: rework discovery with rwmutex, add test 2019-10-28 13:37:27 +03:00
discovery_test.go network: rework discovery with rwmutex, add test 2019-10-28 13:37:27 +03:00
handshakestage_string.go network: make node strictly follow handshake procedure 2019-09-16 16:32:04 +03:00
helper_test.go core: add some interops 2019-10-15 12:56:25 +03:00
message.go fix spelling and godoc comments 2019-10-22 17:56:03 +03:00
message_test.go Node improvements (#47) 2018-03-14 10:36:59 +01:00
peer.go network: make node strictly follow handshake procedure 2019-09-16 16:32:04 +03:00
relay_reason.go fix spelling and godoc comments 2019-10-22 17:56:03 +03:00
server.go network: move inventory semantic check into common code 2019-10-24 13:12:02 +03:00
server_config.go Fix typos and warnings for GoReport / GolangCiLinter (#132) 2019-02-09 16:53:58 +01:00
server_test.go network: remove port check from handleVersionCmd() 2019-10-17 11:19:24 +03:00
tcp_peer.go io: move BinReader/BinWriter there, redo Serializable with it 2019-09-16 23:39:51 +03:00
tcp_transport.go fix spelling and godoc comments 2019-10-22 17:56:03 +03:00
transport.go Fixed some networking issues (#68) 2018-04-13 12:14:08 +02:00