integration: remove origDatasetSizeInBlocks
This commit is contained in:
parent
59a4f648de
commit
b4662b0b69
|
@ -60,12 +60,6 @@ template marketplacesuite*(name: string, body: untyped) =
|
|||
maxCollateral=200.u256
|
||||
)
|
||||
|
||||
proc validateRequest(nodes, tolerance, origDatasetSizeInBlocks: int) =
|
||||
if nodes > 1:
|
||||
doAssert(origDatasetSizeInBlocks >= 3,
|
||||
"dataset size must be greater than or equal to 3 blocks with " &
|
||||
"more than one node")
|
||||
|
||||
proc requestStorage(client: CodexClient,
|
||||
cid: Cid,
|
||||
proofProbability = 3,
|
||||
|
@ -74,10 +68,7 @@ template marketplacesuite*(name: string, body: untyped) =
|
|||
collateral = 100.u256,
|
||||
expiry: uint64 = 4.periods,
|
||||
nodes = providers().len,
|
||||
tolerance = 0,
|
||||
origDatasetSizeInBlocks: int): Future[PurchaseId] {.async.} =
|
||||
|
||||
validateRequest(nodes, tolerance, origDatasetSizeInBlocks)
|
||||
tolerance = 0): Future[PurchaseId] {.async.} =
|
||||
|
||||
let expiry = (await ethProvider.currentTime()) + expiry.u256
|
||||
|
||||
|
|
|
@ -63,8 +63,7 @@ marketplacesuite "Marketplace payouts":
|
|||
expiry=expiry,
|
||||
collateral=collateral,
|
||||
nodes=5,
|
||||
tolerance=1,
|
||||
origDatasetSizeInBlocks=datasetSizeInBlocks
|
||||
tolerance=1
|
||||
)
|
||||
|
||||
# wait until one slot is filled
|
||||
|
|
|
@ -46,8 +46,8 @@ marketplacesuite "Hosts submit regular proofs":
|
|||
|
||||
let purchaseId = await client0.requestStorage(
|
||||
cid,
|
||||
duration=totalPeriods.periods,
|
||||
origDatasetSizeInBlocks = datasetSizeInBlocks)
|
||||
duration=duration
|
||||
)
|
||||
check eventually client0.purchaseStateIs(purchaseId, "started")
|
||||
|
||||
var proofWasSubmitted = false
|
||||
|
@ -106,8 +106,8 @@ marketplacesuite "Simulate invalid proofs":
|
|||
|
||||
let purchaseId = await client0.requestStorage(
|
||||
cid,
|
||||
duration=totalPeriods.periods,
|
||||
origDatasetSizeInBlocks=datasetSizeInBlocks)
|
||||
duration=totalPeriods.periods
|
||||
)
|
||||
let requestId = client0.requestId(purchaseId).get
|
||||
|
||||
check eventually client0.purchaseStateIs(purchaseId, "started")
|
||||
|
@ -162,8 +162,8 @@ marketplacesuite "Simulate invalid proofs":
|
|||
|
||||
let purchaseId = await client0.requestStorage(
|
||||
cid,
|
||||
duration=totalPeriods.periods,
|
||||
origDatasetSizeInBlocks=datasetSizeInBlocks)
|
||||
duration=totalPeriods.periods
|
||||
)
|
||||
let requestId = client0.requestId(purchaseId).get
|
||||
|
||||
check eventually client0.purchaseStateIs(purchaseId, "started")
|
||||
|
|
Loading…
Reference in New Issue