mirror of
https://github.com/codex-storage/nim-codex.git
synced 2025-01-09 12:35:51 +00:00
3181361658
* [state machine] Allow querying of state properties * [purchasing] use new state machine * [state machine] remove old state machine implementation * [purchasing] remove duplication in error handling
19 lines
378 B
Nim
19 lines
378 B
Nim
import ../utils/asyncstatemachine
|
|
import ../market
|
|
import ../clock
|
|
import ../errors
|
|
|
|
export market
|
|
export clock
|
|
export asyncstatemachine
|
|
|
|
type
|
|
Purchase* = ref object of Machine
|
|
future*: Future[void]
|
|
market*: Market
|
|
clock*: Clock
|
|
requestId*: RequestId
|
|
request*: ?StorageRequest
|
|
PurchaseState* = ref object of State
|
|
PurchaseError* = object of CodexError
|