[purchasing] Remove Purchase.selected
There no longer exists a single host that is selected for a contract.
This commit is contained in:
parent
ac6d17e895
commit
698baeef35
|
@ -21,7 +21,6 @@ type
|
|||
market: Market
|
||||
clock: Clock
|
||||
request*: StorageRequest
|
||||
selected*: ?Address
|
||||
PurchaseTimeout* = Timeout
|
||||
|
||||
const DefaultProofProbability = 100.u256
|
||||
|
@ -77,10 +76,7 @@ proc run(purchase: Purchase) {.async.} =
|
|||
done.complete()
|
||||
let request = purchase.request
|
||||
let subscription = await market.subscribeFulfillment(request.id, callback)
|
||||
try:
|
||||
await done
|
||||
purchase.selected = await market.getHost(request.id)
|
||||
finally:
|
||||
await subscription.unsubscribe()
|
||||
|
||||
proc withTimeout(future: Future[void]) {.async.} =
|
||||
|
|
|
@ -44,5 +44,4 @@ func `%`*(purchase: Purchase): JsonNode =
|
|||
"finished": purchase.finished,
|
||||
"error": purchase.error.?msg,
|
||||
"request": purchase.request,
|
||||
"selected": purchase.selected
|
||||
}
|
||||
|
|
|
@ -103,5 +103,4 @@ ethersuite "Integration tests":
|
|||
let purchase = waitFor upload().buy().finish()
|
||||
|
||||
check purchase["error"].getStr == ""
|
||||
check purchase["selected"].getStr == $accounts[1]
|
||||
check available().len == 0
|
||||
|
|
Loading…
Reference in New Issue