don't recalculate and process ranges for every Ack block

This commit is contained in:
orignal
2025-01-03 22:04:09 -05:00
parent fc16a70f7b
commit 18707dd844
2 changed files with 94 additions and 76 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2024, The PurpleI2P Project
* Copyright (c) 2022-2025, The PurpleI2P Project
*
* This file is part of Purple i2pd project and licensed under BSD3
*
@@ -397,6 +397,8 @@ namespace transport
std::unique_ptr<i2p::data::IdentHash> m_PathChallenge;
std::unordered_map<uint32_t, uint32_t> m_ReceivedI2NPMsgIDs; // msgID -> timestamp in seconds
uint64_t m_LastResendTime, m_LastResendAttemptTime; // in milliseconds
int m_NumRanges;
uint8_t m_Ranges[SSU2_MAX_NUM_ACK_RANGES*2]; // ranges sent with previous Ack if any
};
inline uint64_t CreateHeaderMask (const uint8_t * kh, const uint8_t * nonce)