Skip to content

Commit d249e75

Browse files
committed
use LPProtocol.new instead of LPProtocol()
Avoid potenial issue with vacp2p/nim-libp2p#1064 (comment) in a future dependency bump.
1 parent 3d45c05 commit d249e75

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

beacon_chain/networking/eth2_network.nim

+2-1
Original file line numberDiff line numberDiff line change
@@ -2013,7 +2013,8 @@ proc p2pProtocolBackendImpl*(p: P2PProtocol): Backend =
20132013

20142014
try:
20152015
mount `networkVar`.switch,
2016-
LPProtocol(codecs: @[`codecNameLit`], handler: snappyThunk)
2016+
LPProtocol.new(
2017+
codecs = @[`codecNameLit`], handler = snappyThunk)
20172018
except LPError as exc:
20182019
# Failure here indicates that the mounting was done incorrectly which
20192020
# would be a programming error

0 commit comments

Comments
 (0)