cmd/devp2p: implement snap protocol testing (#24276)

This also contains some changes to the protocol handler to
make the tests pass.
This commit is contained in:
Martin Holst Swende
2022-02-04 15:24:32 +01:00
committed by GitHub
parent aaca58a7a1
commit 6ce4670bc0
9 changed files with 864 additions and 18 deletions

View File

@ -125,6 +125,16 @@ func (s *Suite) Eth66Tests() []utesting.Test {
}
}
func (s *Suite) SnapTests() []utesting.Test {
return []utesting.Test{
{Name: "TestSnapStatus", Fn: s.TestSnapStatus},
{Name: "TestSnapAccountRange", Fn: s.TestSnapGetAccountRange},
{Name: "TestSnapGetByteCodes", Fn: s.TestSnapGetByteCodes},
{Name: "TestSnapGetTrieNodes", Fn: s.TestSnapTrieNodes},
{Name: "TestSnapGetStorageRanges", Fn: s.TestSnapGetStorageRanges},
}
}
var (
eth66 = true // indicates whether suite should negotiate eth66 connection
eth65 = false // indicates whether suite should negotiate eth65 connection or below.