Fix missing ssz encoding overhead in truncateEnrs (#1988)

This commit is contained in:
Kim De Mey 2024-01-25 12:30:37 +01:00 committed by GitHub
parent 3199857ed5
commit 3ad00686f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -294,7 +294,7 @@ func truncateEnrs(
let res = enrs.add(enr)
# With max payload of discv5 and the sizes of ENRs this should not occur.
doAssert(res, "32 limit will not be reached")
totalSize = totalSize + enr.len()
totalSize = totalSize + enr.len() + enrOverhead
else:
break