aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/protocols
diff options
context:
space:
mode:
authorElad <theman@elad.im>2019-01-25 00:23:34 +0800
committerRafael Matias <rafael@skyle.net>2019-02-19 19:56:31 +0800
commit2695aa9e0d09e58817d2560ecdbd7b5b67f8f1b0 (patch)
tree597df951ae6ea5389bdb26b7199c9a299a155acb /p2p/protocols
parente247dcc141a5d1c9129b987a5f164e9df29be951 (diff)
downloadgo-tangerine-2695aa9e0d09e58817d2560ecdbd7b5b67f8f1b0.tar
go-tangerine-2695aa9e0d09e58817d2560ecdbd7b5b67f8f1b0.tar.gz
go-tangerine-2695aa9e0d09e58817d2560ecdbd7b5b67f8f1b0.tar.bz2
go-tangerine-2695aa9e0d09e58817d2560ecdbd7b5b67f8f1b0.tar.lz
go-tangerine-2695aa9e0d09e58817d2560ecdbd7b5b67f8f1b0.tar.xz
go-tangerine-2695aa9e0d09e58817d2560ecdbd7b5b67f8f1b0.tar.zst
go-tangerine-2695aa9e0d09e58817d2560ecdbd7b5b67f8f1b0.zip
p2p/testing, swarm: remove unused testing.T in protocol tester (#18500)
(cherry picked from commit 2abeb35d5425d72c2f7fdfe4209f7a94fac52a8e)
Diffstat (limited to 'p2p/protocols')
-rw-r--r--p2p/protocols/protocol_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/p2p/protocols/protocol_test.go b/p2p/protocols/protocol_test.go
index a26222cd8..4bc1e547e 100644
--- a/p2p/protocols/protocol_test.go
+++ b/p2p/protocols/protocol_test.go
@@ -142,9 +142,9 @@ func newProtocol(pp *p2ptest.TestPeerPool) func(*p2p.Peer, p2p.MsgReadWriter) er
}
}
-func protocolTester(t *testing.T, pp *p2ptest.TestPeerPool) *p2ptest.ProtocolTester {
+func protocolTester(pp *p2ptest.TestPeerPool) *p2ptest.ProtocolTester {
conf := adapters.RandomNodeConfig()
- return p2ptest.NewProtocolTester(t, conf.ID, 2, newProtocol(pp))
+ return p2ptest.NewProtocolTester(conf.ID, 2, newProtocol(pp))
}
func protoHandshakeExchange(id enode.ID, proto *protoHandshake) []p2ptest.Exchange {
@@ -173,7 +173,7 @@ func protoHandshakeExchange(id enode.ID, proto *protoHandshake) []p2ptest.Exchan
func runProtoHandshake(t *testing.T, proto *protoHandshake, errs ...error) {
pp := p2ptest.NewTestPeerPool()
- s := protocolTester(t, pp)
+ s := protocolTester(pp)
// TODO: make this more than one handshake
node := s.Nodes[0]
if err := s.TestExchanges(protoHandshakeExchange(node.ID(), proto)...); err != nil {
@@ -250,7 +250,7 @@ func TestProtocolHook(t *testing.T) {
}
conf := adapters.RandomNodeConfig()
- tester := p2ptest.NewProtocolTester(t, conf.ID, 2, runFunc)
+ tester := p2ptest.NewProtocolTester(conf.ID, 2, runFunc)
err := tester.TestExchanges(p2ptest.Exchange{
Expects: []p2ptest.Expect{
{
@@ -389,7 +389,7 @@ func moduleHandshakeExchange(id enode.ID, resp uint) []p2ptest.Exchange {
func runModuleHandshake(t *testing.T, resp uint, errs ...error) {
pp := p2ptest.NewTestPeerPool()
- s := protocolTester(t, pp)
+ s := protocolTester(pp)
node := s.Nodes[0]
if err := s.TestExchanges(protoHandshakeExchange(node.ID(), &protoHandshake{42, "420"})...); err != nil {
t.Fatal(err)
@@ -469,7 +469,7 @@ func testMultiPeerSetup(a, b enode.ID) []p2ptest.Exchange {
func runMultiplePeers(t *testing.T, peer int, errs ...error) {
pp := p2ptest.NewTestPeerPool()
- s := protocolTester(t, pp)
+ s := protocolTester(pp)
if err := s.TestExchanges(testMultiPeerSetup(s.Nodes[0].ID(), s.Nodes[1].ID())...); err != nil {
t.Fatal(err)