use parens around `=? (await...)` calls
This commit is contained in:
parent
3ce68f696e
commit
b7c736b34c
|
@ -37,13 +37,16 @@ type
|
||||||
method getBlock*(self: NetworkStore, address: BlockAddress): Future[?!Block] {.async.} =
|
method getBlock*(self: NetworkStore, address: BlockAddress): Future[?!Block] {.async.} =
|
||||||
trace "Getting block from local store or network", address
|
trace "Getting block from local store or network", address
|
||||||
|
|
||||||
without blk =? await self.localStore.getBlock(address), error:
|
without blk =? (await self.localStore.getBlock(address)), err:
|
||||||
if not (error of BlockNotFoundError): return failure error
|
if not (err of BlockNotFoundError):
|
||||||
trace "Block not in local store", address
|
trace "Error getting block from local store", address, err = err.msg
|
||||||
|
return failure err
|
||||||
|
|
||||||
without newBlock =? (await self.engine.requestBlock(address)).catch, error:
|
trace "Block not in local store", address, err = err.msg
|
||||||
trace "Unable to get block from exchange engine", address
|
|
||||||
return failure error
|
without newBlock =? (await self.engine.requestBlock(address)), err:
|
||||||
|
trace "Unable to get block from exchange engine", address, err = err.msg
|
||||||
|
return failure err
|
||||||
|
|
||||||
return success newBlock
|
return success newBlock
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue