ackhandler: remove unused version parameter from constructor

This commit is contained in:
Marten Seemann 2022-12-24 12:12:36 +13:00
parent 576d85cd3d
commit 3affa1d911
6 changed files with 5 additions and 14 deletions

View file

@ -296,7 +296,6 @@ var newConnection = func(
s.perspective,
s.tracer,
s.logger,
s.version,
)
initialStream := newCryptoStream()
handshakeStream := newCryptoStream()
@ -431,7 +430,6 @@ var newClientConnection = func(
s.perspective,
s.tracer,
s.logger,
s.version,
)
initialStream := newCryptoStream()
handshakeStream := newCryptoStream()

View file

@ -17,8 +17,7 @@ func NewAckHandler(
pers protocol.Perspective,
tracer logging.ConnectionTracer,
logger utils.Logger,
version protocol.VersionNumber,
) (SentPacketHandler, ReceivedPacketHandler) {
sph := newSentPacketHandler(initialPacketNumber, initialMaxDatagramSize, rttStats, clientAddressValidated, pers, tracer, logger)
return sph, newReceivedPacketHandler(sph, rttStats, logger, version)
return sph, newReceivedPacketHandler(sph, rttStats, logger)
}

View file

@ -25,13 +25,12 @@ func newReceivedPacketHandler(
sentPackets sentPacketTracker,
rttStats *utils.RTTStats,
logger utils.Logger,
version protocol.VersionNumber,
) ReceivedPacketHandler {
return &receivedPacketHandler{
sentPackets: sentPackets,
initialPackets: newReceivedPacketTracker(rttStats, logger, version),
handshakePackets: newReceivedPacketTracker(rttStats, logger, version),
appDataPackets: newReceivedPacketTracker(rttStats, logger, version),
initialPackets: newReceivedPacketTracker(rttStats, logger),
handshakePackets: newReceivedPacketTracker(rttStats, logger),
appDataPackets: newReceivedPacketTracker(rttStats, logger),
lowest1RTTPacket: protocol.InvalidPacketNumber,
}
}

View file

@ -23,7 +23,6 @@ var _ = Describe("Received Packet Handler", func() {
sentPackets,
&utils.RTTStats{},
utils.DefaultLogger,
protocol.VersionWhatever,
)
})

View file

@ -31,21 +31,17 @@ type receivedPacketTracker struct {
lastAck *wire.AckFrame
logger utils.Logger
version protocol.VersionNumber
}
func newReceivedPacketTracker(
rttStats *utils.RTTStats,
logger utils.Logger,
version protocol.VersionNumber,
) *receivedPacketTracker {
return &receivedPacketTracker{
packetHistory: newReceivedPacketHistory(),
maxAckDelay: protocol.MaxAckDelay,
rttStats: rttStats,
logger: logger,
version: version,
}
}

View file

@ -19,7 +19,7 @@ var _ = Describe("Received Packet Tracker", func() {
BeforeEach(func() {
rttStats = &utils.RTTStats{}
tracker = newReceivedPacketTracker(rttStats, utils.DefaultLogger, protocol.VersionWhatever)
tracker = newReceivedPacketTracker(rttStats, utils.DefaultLogger)
})
Context("accepting packets", func() {