Marketplace test fails: submitted proof is invalid.
This commit is contained in:
parent
f757e64ba4
commit
32f56e8213
@ -9,8 +9,7 @@ namespace CodexPlugin
|
||||
{
|
||||
private readonly MarketplaceStarter marketplaceStarter = new MarketplaceStarter();
|
||||
|
||||
private const string DefaultDockerImage = "thatbenbierens/nim-codex:prover2";
|
||||
//"codexstorage/nim-codex:latest-dist-tests";
|
||||
private const string DefaultDockerImage = "codexstorage/nim-codex:sha-ba0e7d9-dist-tests";
|
||||
public const string ApiPortTag = "codex_api_port";
|
||||
public const string ListenPortTag = "codex_listen_port";
|
||||
public const string MetricsPortTag = "codex_metrics_port";
|
||||
|
@ -181,17 +181,6 @@ namespace CodexPlugin
|
||||
WaitForStorageContractState(timeout, "finished");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wait for contract to start. Max timeout depends on contract filesize. Allows more time for larger files.
|
||||
/// </summary>
|
||||
public void WaitForStorageContractStarted(ByteSize contractFileSize)
|
||||
{
|
||||
var filesizeInMb = contractFileSize.SizeInBytes / (1024 * 1024);
|
||||
var maxWaitTime = TimeSpan.FromSeconds(filesizeInMb * 10.0);
|
||||
|
||||
WaitForStorageContractStarted(maxWaitTime);
|
||||
}
|
||||
|
||||
public void WaitForStorageContractStarted(TimeSpan timeout)
|
||||
{
|
||||
WaitForStorageContractState(timeout, "started");
|
||||
|
@ -66,8 +66,7 @@ namespace CodexTests.BasicTests
|
||||
.WithStorageQuota(11.GB())
|
||||
.EnableMarketplace(geth, contracts, initialEth: 10.Eth(), initialTokens: sellerInitialBalance, s => s
|
||||
.AsStorageNode()
|
||||
.AsValidator())
|
||||
.WithSimulateProofFailures(failEveryNProofs: 3));
|
||||
.AsValidator()));
|
||||
|
||||
AssertBalance(contracts, seller, Is.EqualTo(sellerInitialBalance));
|
||||
seller.Marketplace.MakeStorageAvailable(
|
||||
@ -91,9 +90,10 @@ namespace CodexTests.BasicTests
|
||||
requiredCollateral: 10.TestTokens(),
|
||||
minRequiredNumberOfNodes: 1,
|
||||
proofProbability: 5,
|
||||
duration: TimeSpan.FromMinutes(5));
|
||||
duration: TimeSpan.FromMinutes(5),
|
||||
expiry: TimeSpan.FromMinutes(4));
|
||||
|
||||
purchaseContract.WaitForStorageContractStarted(fileSize);
|
||||
purchaseContract.WaitForStorageContractStarted(TimeSpan.FromMinutes(4));
|
||||
|
||||
AssertBalance(contracts, seller, Is.LessThan(sellerInitialBalance), "Collateral was not placed.");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user