Make the new methods gcsafe to solve build issues in Nimbus

This commit is contained in:
Zahary Karadjov 2019-06-24 19:49:31 +03:00
parent 9d0326aad4
commit 48699c50ca

View File

@ -26,9 +26,9 @@ proc rpcCallNode*(path: string, params: JsonNode, id: ClientId): JsonNode =
%{"jsonrpc": %"2.0", "method": %path, "params": params, "id": %id}
method call*(client: RpcClient, name: string,
params: JsonNode): Future[Response] {.async, base.} = discard
params: JsonNode): Future[Response] {.gcsafe, async, base.} = discard
method close*(client: RpcClient) {.base, async.} = discard
method close*(client: RpcClient) {.base, gcsafe, async.} = discard
template asyncRaise[T](fut: Future[T], errType: typedesc, msg: string) =
fut.fail(newException(errType, msg))