Bump nim-eth and nim-chronos and fix exception effects
This commit is contained in:
parent
ebb65e9c20
commit
f34431e2d4
|
@ -65,7 +65,9 @@ proc start(nimbus: NimbusNode) =
|
|||
|
||||
# metrics logging
|
||||
if conf.debug.logMetrics:
|
||||
proc logMetrics(udata: pointer) {.closure, gcsafe.} =
|
||||
# https://github.com/nim-lang/Nim/issues/17369
|
||||
var logMetrics: proc(udata: pointer) {.gcsafe, raises: [Defect].}
|
||||
logMetrics = proc(udata: pointer) =
|
||||
{.gcsafe.}:
|
||||
let registry = defaultRegistry
|
||||
info "metrics", registry
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit c8eefb9382a786993fc703386b0bd446ecf9c037
|
||||
Subproject commit e5d3ecdd01866d39be1320426b478cb2fd02effd
|
|
@ -1 +1 @@
|
|||
Subproject commit be5e088b21e06a85cac4826454412db8459ed4f1
|
||||
Subproject commit c5dace27cad9f3f832f40f0e37b8063125cc9871
|
|
@ -331,7 +331,8 @@ proc nimbus_post(message: ptr CPostMessage): bool {.exportc, dynlib.} =
|
|||
powTarget = message.powTarget)
|
||||
|
||||
proc nimbus_subscribe_filter(options: ptr CFilterOptions,
|
||||
handler: proc (msg: ptr CReceivedMessage, udata: pointer) {.gcsafe, cdecl.},
|
||||
handler: proc (msg: ptr CReceivedMessage, udata: pointer)
|
||||
{.gcsafe, cdecl, raises: [Defect].},
|
||||
udata: pointer = nil, id: var Identifier): bool {.exportc, dynlib.} =
|
||||
## Encryption is mandatory.
|
||||
## A symmetric key or an asymmetric key must be provided. Both is not allowed.
|
||||
|
@ -373,7 +374,7 @@ proc nimbus_subscribe_filter(options: ptr CFilterOptions,
|
|||
let filter = initFilter(src, privateKey, symKey, @[options.topic],
|
||||
options.minPow, options.allowP2P)
|
||||
|
||||
proc c_handler(msg: ReceivedMessage) {.gcsafe.} =
|
||||
proc c_handler(msg: ReceivedMessage) {.gcsafe, raises: [Defect].} =
|
||||
var cmsg = CReceivedMessage(
|
||||
decoded: unsafeAddr msg.decoded.payload[0],
|
||||
decodedLen: msg.decoded.payload.len(),
|
||||
|
@ -429,7 +430,8 @@ proc nimbus_get_bloom_filter(bloom: var Bloom) {.exportc, dynlib, raises: [].} =
|
|||
|
||||
# TODO: Return filter ID if we ever want to unsubscribe
|
||||
proc subscribeChannel(
|
||||
channel: string, handler: proc (msg: ReceivedMessage) {.gcsafe.}) =
|
||||
channel: string, handler: proc (msg: ReceivedMessage)
|
||||
{.gcsafe, raises: [Defect].}) =
|
||||
var ctx: HMAC[sha256]
|
||||
var symKey: SymKey
|
||||
discard ctx.pbkdf2(channel, "", 65356, symKey)
|
||||
|
@ -447,11 +449,11 @@ proc subscribeChannel(
|
|||
|
||||
proc nimbus_join_public_chat(channel: cstring,
|
||||
handler: proc (msg: ptr CReceivedMessage)
|
||||
{.gcsafe, cdecl.}) {.exportc, dynlib.} =
|
||||
{.gcsafe, cdecl, raises: [Defect].}) {.exportc, dynlib.} =
|
||||
if handler.isNil:
|
||||
subscribeChannel($channel, nil)
|
||||
else:
|
||||
proc c_handler(msg: ReceivedMessage) =
|
||||
proc c_handler(msg: ReceivedMessage) {.raises: [Defect].} =
|
||||
var cmsg = CReceivedMessage(
|
||||
decoded: unsafeAddr msg.decoded.payload[0],
|
||||
decodedLen: msg.decoded.payload.len(),
|
||||
|
|
Loading…
Reference in New Issue