bump libp2p (#6132)

This commit is contained in:
diegomrsantos 2024-03-27 11:16:57 +01:00 committed by GitHub
parent 0e9b3dbad0
commit edad7c8a4c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 5 deletions

View File

@ -2295,14 +2295,11 @@ proc createEth2Node*(rng: ref HmacDrbgContext,
let phase0Prefix = "/eth2/" & $forkDigests.phase0
func msgIdProvider(m: messages.Message): Result[seq[byte], ValidationResult] =
template topic: untyped =
if m.topicIds.len > 0: m.topicIds[0] else: ""
try:
# This doesn't have to be a tight bound, just enough to avoid denial of
# service attacks.
let decoded = snappy.decode(m.data, static(GOSSIP_MAX_SIZE.uint32))
ok(gossipId(decoded, phase0Prefix, topic))
ok(gossipId(decoded, phase0Prefix, m.topic))
except CatchableError:
err(ValidationResult.Reject)

2
vendor/nim-libp2p vendored

@ -1 +1 @@
Subproject commit 28609597d104a9be880ed5e1648e1ce18ca9dc38
Subproject commit 458b0885dd276afeb81b9a6d431dde79e99f2b01