Merge pull request #25924 from holiman/comments_fix

all: fix docstrings
This commit is contained in:
Péter Szilágyi
2022-10-04 13:30:00 +03:00
committed by GitHub
48 changed files with 110 additions and 95 deletions
+1 -1
View File
@@ -121,7 +121,7 @@ type stRangesTest struct {
expSlots int
}
// TestSnapGetStorageRange various forms of GetStorageRanges requests.
// TestSnapGetStorageRanges various forms of GetStorageRanges requests.
func (s *Suite) TestSnapGetStorageRanges(t *utesting.T) {
var (
ffHash = common.HexToHash("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")
+6 -6
View File
@@ -37,9 +37,9 @@ const (
var (
// Remote node under test
Remote string
// IP where the first tester is listening, port will be assigned
// Listen1 is the IP where the first tester is listening, port will be assigned
Listen1 string = "127.0.0.1"
// IP where the second tester is listening, port will be assigned
// Listen2 is the IP where the second tester is listening, port will be assigned
// Before running the test, you may have to `sudo ifconfig lo0 add 127.0.0.2` (on MacOS at least)
Listen2 string = "127.0.0.2"
)
@@ -68,7 +68,7 @@ func futureExpiration() uint64 {
return uint64(time.Now().Add(expiration).Unix())
}
// This test just sends a PING packet and expects a response.
// BasicPing just sends a PING packet and expects a response.
func BasicPing(t *utesting.T) {
te := newTestEnv(Remote, Listen1, Listen2)
defer te.close()
@@ -137,7 +137,7 @@ func (te *testenv) checkPong(reply v4wire.Packet, pingHash []byte) error {
return nil
}
// This test sends a PING packet with wrong 'to' field and expects a PONG response.
// PingWrongTo sends a PING packet with wrong 'to' field and expects a PONG response.
func PingWrongTo(t *utesting.T) {
te := newTestEnv(Remote, Listen1, Listen2)
defer te.close()
@@ -154,7 +154,7 @@ func PingWrongTo(t *utesting.T) {
}
}
// This test sends a PING packet with wrong 'from' field and expects a PONG response.
// PingWrongFrom sends a PING packet with wrong 'from' field and expects a PONG response.
func PingWrongFrom(t *utesting.T) {
te := newTestEnv(Remote, Listen1, Listen2)
defer te.close()
@@ -172,7 +172,7 @@ func PingWrongFrom(t *utesting.T) {
}
}
// This test sends a PING packet with additional data at the end and expects a PONG
// PingExtraData This test sends a PING packet with additional data at the end and expects a PONG
// response. The remote node should respond because EIP-8 mandates ignoring additional
// trailing data.
func PingExtraData(t *utesting.T) {
+7 -7
View File
@@ -58,7 +58,7 @@ func (s *Suite) AllTests() []utesting.Test {
}
}
// This test sends PING and expects a PONG response.
// TestPing sends PING and expects a PONG response.
func (s *Suite) TestPing(t *utesting.T) {
conn, l1 := s.listen1(t)
defer conn.close()
@@ -84,7 +84,7 @@ func checkPong(t *utesting.T, pong *v5wire.Pong, ping *v5wire.Ping, c net.Packet
}
}
// This test sends PING with a 9-byte request ID, which isn't allowed by the spec.
// TestPingLargeRequestID sends PING with a 9-byte request ID, which isn't allowed by the spec.
// The remote node should not respond.
func (s *Suite) TestPingLargeRequestID(t *utesting.T) {
conn, l1 := s.listen1(t)
@@ -103,7 +103,7 @@ func (s *Suite) TestPingLargeRequestID(t *utesting.T) {
}
}
// In this test, a session is established from one IP as usual. The session is then reused
// TestPingMultiIP establishes a session from one IP as usual. The session is then reused
// on another IP, which shouldn't work. The remote node should respond with WHOAREYOU for
// the attempt from a different IP.
func (s *Suite) TestPingMultiIP(t *utesting.T) {
@@ -153,7 +153,7 @@ func (s *Suite) TestPingMultiIP(t *utesting.T) {
}
}
// This test starts a handshake, but doesn't finish it and sends a second ordinary message
// TestPingHandshakeInterrupted starts a handshake, but doesn't finish it and sends a second ordinary message
// packet instead of a handshake message packet. The remote node should respond with
// another WHOAREYOU challenge for the second packet.
func (s *Suite) TestPingHandshakeInterrupted(t *utesting.T) {
@@ -180,7 +180,7 @@ func (s *Suite) TestPingHandshakeInterrupted(t *utesting.T) {
}
}
// This test sends TALKREQ and expects an empty TALKRESP response.
// TestTalkRequest sends TALKREQ and expects an empty TALKRESP response.
func (s *Suite) TestTalkRequest(t *utesting.T) {
conn, l1 := s.listen1(t)
defer conn.close()
@@ -215,7 +215,7 @@ func (s *Suite) TestTalkRequest(t *utesting.T) {
}
}
// This test checks that the remote node returns itself for FINDNODE with distance zero.
// TestFindnodeZeroDistance checks that the remote node returns itself for FINDNODE with distance zero.
func (s *Suite) TestFindnodeZeroDistance(t *utesting.T) {
conn, l1 := s.listen1(t)
defer conn.close()
@@ -232,7 +232,7 @@ func (s *Suite) TestFindnodeZeroDistance(t *utesting.T) {
}
}
// In this test, multiple nodes ping the node under test. After waiting for them to be
// TestFindnodeResults pings the node under test from multiple nodes. After waiting for them to be
// accepted into the remote table, the test checks that they are returned by FINDNODE.
func (s *Suite) TestFindnodeResults(t *utesting.T) {
// Create bystanders.