From 242022bd79d4740833ebe78fac4d4c4fb6a327ce Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Fri, 15 Jul 2022 16:30:46 +0200 Subject: [PATCH] cmd/devp2p/internal/ethtest: remove even more '66' --- cmd/devp2p/internal/ethtest/helpers.go | 6 ++---- cmd/devp2p/internal/ethtest/suite.go | 18 +++++++----------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/cmd/devp2p/internal/ethtest/helpers.go b/cmd/devp2p/internal/ethtest/helpers.go index 5b431a9c2c1c..eeeb4f93cabf 100644 --- a/cmd/devp2p/internal/ethtest/helpers.go +++ b/cmd/devp2p/internal/ethtest/helpers.go @@ -68,9 +68,7 @@ func (s *Suite) dial() (*Conn, error) { return &conn, nil } -// dial66 attempts to dial the given node and perform a handshake, -// returning the created Conn with additional snap/1 capabilities if -// successful. +// dialSnap creates a connection with snap/1 capability. func (s *Suite) dialSnap() (*Conn, error) { conn, err := s.dial() if err != nil { @@ -220,7 +218,7 @@ func (s *Suite) createSendAndRecvConns() (*Conn, *Conn, error) { return sendConn, recvConn, nil } -// readAndServe serves eth66 GetBlockHeaders requests while waiting +// readAndServe serves GetBlockHeaders requests while waiting // on another message from the node. func (c *Conn) readAndServe(chain *Chain, timeout time.Duration) Message { start := time.Now() diff --git a/cmd/devp2p/internal/ethtest/suite.go b/cmd/devp2p/internal/ethtest/suite.go index 76e873f0d67f..7059b4ba738c 100644 --- a/cmd/devp2p/internal/ethtest/suite.go +++ b/cmd/devp2p/internal/ethtest/suite.go @@ -87,7 +87,7 @@ func (s *Suite) SnapTests() []utesting.Test { } // TestStatus attempts to connect to the given node and exchange -// a status message with it on the eth66 protocol. +// a status message with it on the eth protocol. func (s *Suite) TestStatus(t *utesting.T) { conn, err := s.dial() if err != nil { @@ -100,7 +100,7 @@ func (s *Suite) TestStatus(t *utesting.T) { } // TestGetBlockHeaders tests whether the given node can respond to -// an eth66 `GetBlockHeaders` request and that the response is accurate. +// an eth `GetBlockHeaders` request and that the response is accurate. func (s *Suite) TestGetBlockHeaders(t *utesting.T) { conn, err := s.dial() if err != nil { @@ -309,8 +309,7 @@ func (s *Suite) TestZeroRequestID(t *utesting.T) { } // TestGetBlockBodies tests whether the given node can respond to -// a `GetBlockBodies` request and that the response is accurate over -// the eth66 protocol. +// a `GetBlockBodies` request and that the response is accurate. func (s *Suite) TestGetBlockBodies(t *utesting.T) { conn, err := s.dial() if err != nil { @@ -346,15 +345,14 @@ func (s *Suite) TestGetBlockBodies(t *utesting.T) { } // TestBroadcast tests whether a block announcement is correctly -// propagated to the given node's peer(s) on the eth66 protocol. +// propagated to the node's peers. func (s *Suite) TestBroadcast(t *utesting.T) { if err := s.sendNextBlock(); err != nil { t.Fatalf("block broadcast failed: %v", err) } } -// TestLargeAnnounce tests the announcement mechanism with a large -// block over the eth66 protocol. +// TestLargeAnnounce tests the announcement mechanism with a large block. func (s *Suite) TestLargeAnnounce(t *utesting.T) { nextBlock := len(s.chain.blocks) blocks := []*NewBlock{ @@ -400,8 +398,7 @@ func (s *Suite) TestLargeAnnounce(t *utesting.T) { } } -// TestOldAnnounce tests the announcement mechanism with an old block, -// over the eth66 protocol. +// TestOldAnnounce tests the announcement mechanism with an old block. func (s *Suite) TestOldAnnounce(t *utesting.T) { if err := s.oldAnnounce(); err != nil { t.Fatal(err) @@ -423,8 +420,7 @@ func (s *Suite) TestMaliciousHandshake(t *utesting.T) { } } -// TestMaliciousStatus sends a status package with a large total -// difficulty over the eth66 protocol. +// TestMaliciousStatus sends a status package with a large total difficulty. func (s *Suite) TestMaliciousStatus(t *utesting.T) { conn, err := s.dial() if err != nil {