Skip to content

Commit

Permalink
libp2p: disable self triggering (#3826)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
arnetheduck authored Jun 30, 2022
1 parent c145916 commit 24c435a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion beacon_chain/networking/eth2_network.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 24c435a

Please sign in to comment.