libp2p: disable self triggering (#3826)

All message processing is done in the validation callbacks, so there's
no need to trigger data handlers for messages we publish - the
self-publish is async, and therefore has an associated cost
This commit is contained in:
Jacek Sieka 2022-06-30 11:54:49 +02:00 committed by GitHub
parent c145916414
commit 24c435abae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -2307,7 +2307,8 @@ proc createEth2Node*(rng: ref HmacDrbgContext,
pubsub = GossipSub.init(
switch = switch,
msgIdProvider = msgIdProvider,
triggerSelf = true,
# We process messages in the validator, so we don't need data callbacks
triggerSelf = false,
sign = false,
verifySignature = false,
anonymize = true,