refactor frame parser to remove version parameter from constructor

This commit is contained in:
Marten Seemann 2022-12-24 12:35:54 +13:00
parent 582edae63d
commit ef28f4667f
8 changed files with 76 additions and 77 deletions

View file

@ -33,7 +33,7 @@ func Fuzz(data []byte) int {
encLevel := toEncLevel(data[0])
data = data[PrefixLen:]
parser := wire.NewFrameParser(true, version)
parser := wire.NewFrameParser(true)
parser.SetAckDelayExponent(protocol.DefaultAckDelayExponent)
initialLen := len(data)
@ -41,7 +41,7 @@ func Fuzz(data []byte) int {
var frames []wire.Frame
for len(data) > 0 {
l, f, err := parser.ParseNext(data, encLevel)
l, f, err := parser.ParseNext(data, encLevel, version)
if err != nil {
break
}