Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump libp2p #1344

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion beacon_chain/eth2_network.nim
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ proc runDiscoveryLoop*(node: Eth2Node) {.async.} =
if peerRecord.isOk:
let peerInfo = peerRecord.value.toPeerInfo
if peerInfo != nil:
if peerInfo.id notin node.switch.connections:
if not node.switch.isConnected(peerInfo):
await node.connQueue.addLast(peerInfo)
else:
peerInfo.close()
Expand Down
2 changes: 1 addition & 1 deletion beacon_chain/inspector.nim
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ proc discoveryLoop(conf: InspectorConf,
if pinfoOpt.isOk():
let pinfo = pinfoOpt.get()
if pinfo.hasTCP():
if pinfo.id() notin switch.connections:
if not switch.isConnected(pinfo):
debug "Discovered new peer", peer = pinfo,
peers_count = len(peers)
await connQueue.addLast(pinfo)
Expand Down
2 changes: 2 additions & 0 deletions scripts/launch_local_testnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ for NUM_NODE in $(seq 0 $(( NUM_NODES - 1 ))); do
--metrics-port="$(( BASE_METRICS_PORT + NUM_NODE ))" \
${EXTRA_ARGS} \
> "${DATA_DIR}/log${NUM_NODE}.txt" 2>&1 &

sleep 5

if [[ "${PIDS}" == "" ]]; then
PIDS="$!"
Expand Down
2 changes: 1 addition & 1 deletion vendor/nim-libp2p