diff options
author | Andrey Petrov <andrey.petrov@shazow.net> | 2018-06-07 22:31:09 +0800 |
---|---|---|
committer | Andrey Petrov <andrey.petrov@shazow.net> | 2018-06-22 00:22:47 +0800 |
commit | 399aa710d514561be571dc180aa4afe9fcc2138d (patch) | |
tree | 14d61e3b9b5ac06b44caba809f75fd4362ef4a87 | |
parent | 699794d88d86c30fa8ac74c0bbe3e0ac9cde88a2 (diff) | |
download | dexon-399aa710d514561be571dc180aa4afe9fcc2138d.tar dexon-399aa710d514561be571dc180aa4afe9fcc2138d.tar.gz dexon-399aa710d514561be571dc180aa4afe9fcc2138d.tar.bz2 dexon-399aa710d514561be571dc180aa4afe9fcc2138d.tar.lz dexon-399aa710d514561be571dc180aa4afe9fcc2138d.tar.xz dexon-399aa710d514561be571dc180aa4afe9fcc2138d.tar.zst dexon-399aa710d514561be571dc180aa4afe9fcc2138d.zip |
p2p: Attempt to race check peer.Inbound() in TestServerDial
-rw-r--r-- | p2p/server_test.go | 3 |
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) |