v5test

package
v1.13.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Suite

type Suite struct {
	Dest             *enode.Node
	Listen1, Listen2 string // listening addresses
}

Suite is the discv5 test suite.

func (*Suite) AllTests

func (s *Suite) AllTests() []utesting.Test

func (*Suite) TestFindnodeResults

func (s *Suite) TestFindnodeResults(t *utesting.T)

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 (*Suite) TestFindnodeZeroDistance

func (s *Suite) TestFindnodeZeroDistance(t *utesting.T)

TestFindnodeZeroDistance checks that the remote node returns itself for FINDNODE with distance zero.

func (*Suite) TestPing

func (s *Suite) TestPing(t *utesting.T)

TestPing sends PING and expects a PONG response.

func (*Suite) TestPingHandshakeInterrupted

func (s *Suite) TestPingHandshakeInterrupted(t *utesting.T)

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 (*Suite) TestPingLargeRequestID

func (s *Suite) TestPingLargeRequestID(t *utesting.T)

TestPingLargeRequestID sends PING with a 9-byte request ID, which isn't allowed by the spec. The remote node should not respond.

func (*Suite) TestPingMultiIP

func (s *Suite) TestPingMultiIP(t *utesting.T)

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 (*Suite) TestTalkRequest

func (s *Suite) TestTalkRequest(t *utesting.T)

TestTalkRequest sends TALKREQ and expects an empty TALKRESP response.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL