Merging latest master and possible bug? (#552)

* put conditional locks on nbc bump (#549)

* Fix minor exception issues (#550)

Makes code compatible with
https://github.com/status-im/nim-chronos/pull/166 without requiring it.

* fix nimbus ref for auto-bump stable's PR

* `doAssert` is `ValueError` not `AssertionError`?

* Revert ValueError, fixed in chronos

Co-authored-by: Giovanni Petrantoni <7008900+sinkingsugar@users.noreply.github.com>
Co-authored-by: Jacek Sieka <jacek@status.im>
This commit is contained in:
Dmitriy Ryajov 2021-03-26 06:26:55 -04:00 committed by GitHub
parent 2c3613577b
commit 4081d2b9b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 4 deletions

View File

@ -207,6 +207,7 @@ jobs:
nimble test
bumpNBC-stable:
if: github.ref == 'refs/heads/master'
needs: build
runs-on: ubuntu-latest
steps:
@ -221,6 +222,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: status-im/nimbus-eth2
ref: unstable
path: nbc
submodules: true
fetch-depth: 0
@ -246,6 +248,7 @@ jobs:
title: nim-libp2p auto bump
bumpNBC-unstable:
if: github.ref == 'refs/heads/unstable'
needs: build
runs-on: ubuntu-latest
steps:

View File

@ -42,7 +42,7 @@ proc isUpgraded*(s: Connection): bool =
if not isNil(s.upgraded):
return s.upgraded.finished
proc upgrade*(s: Connection, failed: ref Exception = nil) =
proc upgrade*(s: Connection, failed: ref CatchableError = nil) =
if not isNil(s.upgraded):
if not isNil(failed):
s.upgraded.fail(failed)

View File

@ -79,8 +79,6 @@ proc removePeerEventHandler*(s: Switch,
kind: PeerEventKind) =
s.connManager.removePeerEventHandler(handler, kind)
proc disconnect*(s: Switch, peerId: PeerID) {.async, gcsafe.}
proc isConnected*(s: Switch, peerId: PeerID): bool =
## returns true if the peer has one or more
## associated connections (sockets)

View File

@ -38,7 +38,7 @@ type
opened*: uint64
closed*: uint64
proc setupTcpTransportTracker(): TcpTransportTracker {.gcsafe.}
proc setupTcpTransportTracker(): TcpTransportTracker {.gcsafe, raises: [Defect].}
proc getTcpTransportTracker(): TcpTransportTracker {.gcsafe.} =
result = cast[TcpTransportTracker](getTracker(TcpTransportTrackerName))