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.} =
|
||||
trace "Getting block from local store or network", address
|
||||
|
||||
without blk =? await self.localStore.getBlock(address), error:
|
||||
if not (error of BlockNotFoundError): return failure error
|
||||
trace "Block not in local store", address
|
||||
without blk =? (await self.localStore.getBlock(address)), err:
|
||||
if not (err of BlockNotFoundError):
|
||||
trace "Error getting block from local store", address, err = err.msg
|
||||
return failure err
|
||||
|
||||
without newBlock =? (await self.engine.requestBlock(address)).catch, error:
|
||||
trace "Unable to get block from exchange engine", address
|
||||
return failure error
|
||||
trace "Block not in local store", address, err = err.msg
|
||||
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue