aboutsummaryrefslogtreecommitdiffstats
path: root/p2p
diff options
context:
space:
mode:
authorAndrey Petrov <andrey.petrov@shazow.net>2018-06-07 22:31:09 +0800
committerAndrey Petrov <andrey.petrov@shazow.net>2018-06-22 00:22:47 +0800
commit399aa710d514561be571dc180aa4afe9fcc2138d (patch)
tree14d61e3b9b5ac06b44caba809f75fd4362ef4a87 /p2p
parent699794d88d86c30fa8ac74c0bbe3e0ac9cde88a2 (diff)
downloadgo-tangerine-399aa710d514561be571dc180aa4afe9fcc2138d.tar.gz
go-tangerine-399aa710d514561be571dc180aa4afe9fcc2138d.tar.zst
go-tangerine-399aa710d514561be571dc180aa4afe9fcc2138d.zip
p2p: Attempt to race check peer.Inbound() in TestServerDial
Diffstat (limited to 'p2p')
-rw-r--r--p2p/server_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/p2p/server_test.go b/p2p/server_test.go
index 5fad1d0a7..7eca46938 100644
--- a/p2p/server_test.go
+++ b/p2p/server_test.go
@@ -181,6 +181,9 @@ func TestServerDial(t *testing.T) {
if peer := srv.Peers()[0]; !peer.Info().Network.Trusted {
t.Errorf("peer is not trusted after AddTrustedPeer: %v", peer)
}
+ if peer := srv.Peers()[0]; peer.Inbound() {
+ t.Errorf("peer is marked inbound")
+ }
srv.RemoveTrustedPeer(node)
if peer := srv.Peers()[0]; peer.Info().Network.Trusted {
t.Errorf("peer is trusted after RemoveTrustedPeer: %v", peer)