From 9256db226585f9460f3ed7d46787840ac66bef15 Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Thu, 21 Mar 2024 17:53:59 +0100 Subject: [PATCH] use `LPProtocol.new` instead of `LPProtocol()` (#6117) Avoid potenial issue with https://github.com/vacp2p/nim-libp2p/pull/1064#discussion_r1534021691 in a future dependency bump. --- beacon_chain/networking/eth2_network.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/beacon_chain/networking/eth2_network.nim b/beacon_chain/networking/eth2_network.nim index c140f63a9..c86e3a769 100644 --- a/beacon_chain/networking/eth2_network.nim +++ b/beacon_chain/networking/eth2_network.nim @@ -2013,7 +2013,8 @@ proc p2pProtocolBackendImpl*(p: P2PProtocol): Backend = try: mount `networkVar`.switch, - LPProtocol(codecs: @[`codecNameLit`], handler: snappyThunk) + LPProtocol.new( + codecs = @[`codecNameLit`], handler = snappyThunk) except LPError as exc: # Failure here indicates that the mounting was done incorrectly which # would be a programming error