remove error return value from ComposeVersionNegotiation (#3410)

This commit is contained in:
Chao Fei 2022-05-12 23:03:39 +08:00 committed by GitHub
parent b9a77af8f9
commit 60bbe92194
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 14 additions and 30 deletions

View file

@ -24,11 +24,7 @@ func getVNP(src, dest protocol.ConnectionID, numVersions int) []byte {
for i := 0; i < numVersions; i++ {
versions[i] = protocol.VersionNumber(rand.Uint32())
}
data, err := wire.ComposeVersionNegotiation(src, dest, versions)
if err != nil {
log.Fatal(err)
}
return data
return wire.ComposeVersionNegotiation(src, dest, versions)
}
func main() {

View file

@ -91,8 +91,6 @@ func fuzzVNP(data []byte) int {
if len(versions) == 0 {
panic("no versions")
}
if _, err := wire.ComposeVersionNegotiation(hdr.SrcConnectionID, hdr.DestConnectionID, versions); err != nil {
panic(err)
}
wire.ComposeVersionNegotiation(hdr.SrcConnectionID, hdr.DestConnectionID, versions)
return 1
}