mirror of
https://github.com/status-im/nim-codex.git
synced 2025-01-10 19:06:28 +00:00
9d218c88a5
Remove `isSlotCancelled` and `isCancelled` from proving, as it did not fit in the module. Update the proving module to not rely on checking the contract to understand if a request was cancelled. Instead, `proofEnd` was modified in `dagger-contracts` such that it returns a past timestamp when the contract is cancelled. This successfully removes
45 lines
1.3 KiB
Nim
45 lines
1.3 KiB
Nim
import pkg/chronos
|
|
import pkg/stint
|
|
import pkg/upraises
|
|
import ./periods
|
|
import ../../contracts/requests
|
|
|
|
export chronos
|
|
export stint
|
|
export periods
|
|
export requests
|
|
|
|
type
|
|
Proofs* = ref object of RootObj
|
|
Subscription* = ref object of RootObj
|
|
OnProofSubmitted* = proc(id: SlotId, proof: seq[byte]) {.gcsafe, upraises:[].}
|
|
|
|
method periodicity*(proofs: Proofs):
|
|
Future[Periodicity] {.base, async.} =
|
|
raiseAssert("not implemented")
|
|
|
|
method isProofRequired*(proofs: Proofs,
|
|
id: SlotId): Future[bool] {.base, async.} =
|
|
raiseAssert("not implemented")
|
|
|
|
method willProofBeRequired*(proofs: Proofs,
|
|
id: SlotId): Future[bool] {.base, async.} =
|
|
raiseAssert("not implemented")
|
|
|
|
method getProofEnd*(proofs: Proofs,
|
|
id: SlotId): Future[UInt256] {.base, async.} =
|
|
raiseAssert("not implemented")
|
|
|
|
method submitProof*(proofs: Proofs,
|
|
id: SlotId,
|
|
proof: seq[byte]) {.base, async.} =
|
|
raiseAssert("not implemented")
|
|
|
|
method subscribeProofSubmission*(proofs: Proofs,
|
|
callback: OnProofSubmitted):
|
|
Future[Subscription] {.base, async.} =
|
|
raiseAssert("not implemented")
|
|
|
|
method unsubscribe*(subscription: Subscription) {.base, async, upraises:[].} =
|
|
raiseAssert("not implemented")
|