Add missing pragma raises errors

This commit is contained in:
Arnaud 2025-02-07 16:17:50 +01:00
parent 37738b8284
commit cad2ec75de
No known key found for this signature in database
GPG Key ID: 69D6CE281FCAE663
2 changed files with 27 additions and 9 deletions

View File

@ -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.} =

View File

@ -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.} =