[market] remove fulfillRequest()

It is superseded by fillSlot()
This commit is contained in:
Mark Spanbroek 2022-07-27 17:00:13 +02:00 committed by markspanbroek
parent 04e0c54e95
commit 7995fd71d5
3 changed files with 0 additions and 26 deletions

View File

@ -42,11 +42,6 @@ method getRequest(market: OnChainMarket,
else: else:
return none StorageRequest return none StorageRequest
method fulfillRequest(market: OnChainMarket,
requestId: array[32, byte],
proof: seq[byte]) {.async.} =
await market.contract.fulfillRequest(requestId, proof)
method getHost(market: OnChainMarket, method getHost(market: OnChainMarket,
requestId: array[32, byte], requestId: array[32, byte],
slotIndex: UInt256): Future[?Address] {.async.} = slotIndex: UInt256): Future[?Address] {.async.} =

View File

@ -27,11 +27,6 @@ method getRequest*(market: Market,
Future[?StorageRequest] {.base, async.} = Future[?StorageRequest] {.base, async.} =
raiseAssert("not implemented") raiseAssert("not implemented")
method fulfillRequest*(market: Market,
requestId: array[32, byte],
proof: seq[byte]) {.base, async.} =
raiseAssert("not implemented")
method getHost*(market: Market, method getHost*(market: Market,
requestId: array[32, byte], requestId: array[32, byte],
slotIndex: UInt256): Future[?Address] {.base, async.} = slotIndex: UInt256): Future[?Address] {.base, async.} =

View File

@ -58,22 +58,6 @@ method getRequest(market: MockMarket,
return some request return some request
return none StorageRequest return none StorageRequest
proc fulfillRequest*(market: MockMarket,
requestId: array[32, byte],
proof: seq[byte],
host: Address) =
let fulfillment = Fulfillment(requestId: requestId, proof: proof, host: host)
market.fulfilled.add(fulfillment)
var subscriptions = market.subscriptions.onFulfillment
for subscription in subscriptions:
if subscription.requestId == requestId:
subscription.callback(requestId)
method fulfillRequest*(market: MockMarket,
requestId: array[32, byte],
proof: seq[byte]) {.async.} =
market.fulfillRequest(requestid, proof, market.signer)
method getHost(market: MockMarket, method getHost(market: MockMarket,
requestId: array[32, byte], requestId: array[32, byte],
slotIndex: UInt256): Future[?Address] {.async.} = slotIndex: UInt256): Future[?Address] {.async.} =