From cad2ec75de4d4b2e14b11dd2362fc6264f2b595c Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 7 Feb 2025 16:17:50 +0100 Subject: [PATCH] Add missing pragma raises errors --- codex/market.nim | 20 +++++++++++++++----- tests/codex/helpers/mockmarket.nim | 16 ++++++++++++---- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/codex/market.nim b/codex/market.nim index 95694fd9..70ca1467 100644 --- a/codex/market.nim +++ b/codex/market.nim @@ -68,22 +68,32 @@ method loadConfig*( ): Future[void] {.base, async: (raises: [CatchableError]).} = raiseAssert("not implemented") -method getZkeyHash*(market: Market): Future[?string] {.base, async.} = +method getZkeyHash*( + market: Market +): Future[?string] {.base, async: (raises: [CatchableError]).} = raiseAssert("not implemented") method getSigner*(market: Market): Future[Address] {.base, async.} = raiseAssert("not implemented") -method periodicity*(market: Market): Future[Periodicity] {.base, async.} = +method periodicity*( + market: Market +): Future[Periodicity] {.base, async: (raises: [CatchableError]).} = raiseAssert("not implemented") -method proofTimeout*(market: Market): Future[UInt256] {.base, async.} = +method proofTimeout*( + market: Market +): Future[UInt256] {.base, async: (raises: [CatchableError]).} = raiseAssert("not implemented") -method repairRewardPercentage*(market: Market): Future[uint8] {.base, async.} = +method repairRewardPercentage*( + market: Market +): Future[uint8] {.base, async: (raises: [CatchableError]).} = raiseAssert("not implemented") -method proofDowntime*(market: Market): Future[uint8] {.base, async.} = +method proofDowntime*( + market: Market +): Future[uint8] {.base, async: (raises: [CatchableError]).} = raiseAssert("not implemented") method getPointer*(market: Market, slotId: SlotId): Future[uint8] {.base, async.} = diff --git a/tests/codex/helpers/mockmarket.nim b/tests/codex/helpers/mockmarket.nim index 0611d36d..04394db1 100644 --- a/tests/codex/helpers/mockmarket.nim +++ b/tests/codex/helpers/mockmarket.nim @@ -141,16 +141,24 @@ method loadConfig*( method getSigner*(market: MockMarket): Future[Address] {.async.} = return market.signer -method periodicity*(mock: MockMarket): Future[Periodicity] {.async.} = +method periodicity*( + mock: MockMarket +): Future[Periodicity] {.async: (raises: [CatchableError]).} = return Periodicity(seconds: mock.config.proofs.period) -method proofTimeout*(market: MockMarket): Future[UInt256] {.async.} = +method proofTimeout*( + market: MockMarket +): Future[UInt256] {.async: (raises: [CatchableError]).} = return market.config.proofs.timeout -method proofDowntime*(market: MockMarket): Future[uint8] {.async.} = +method proofDowntime*( + market: MockMarket +): Future[uint8] {.async: (raises: [CatchableError]).} = return market.config.proofs.downtime -method repairRewardPercentage*(market: MockMarket): Future[uint8] {.async.} = +method repairRewardPercentage*( + market: MockMarket +): Future[uint8] {.async: (raises: [CatchableError]).} = return market.config.collateral.repairRewardPercentage method getPointer*(market: MockMarket, slotId: SlotId): Future[uint8] {.async.} =