Fixes connection from codex node to its companion

This commit is contained in:
benbierens 2023-04-19 11:23:11 +02:00
parent e9d84a5cf7
commit 5b132bcb54
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
2 changed files with 8 additions and 7 deletions

View File

@ -43,7 +43,7 @@ namespace DistTestCore.Marketplace
var bootPort = config.BootstrapNode.DiscoveryPort.Number;
var bootstrapArg = $"--bootnodes enode://{bootPubKey}@{bootIp}:{bootPort}";
return $"--port {port.Number} --discovery.port {discovery.Number} --authrpc.port {authRpc.Number} --http.port {httpPort.Number} --ws --ws.port {wsPort.Number} --nodiscover {bootstrapArg}";
return $"--port {port.Number} --discovery.port {discovery.Number} --authrpc.port {authRpc.Number} --http.port {httpPort.Number} --ws --ws.addr 0.0.0.0 --ws.port {wsPort.Number} --nodiscover {bootstrapArg}";
}
}
}

View File

@ -51,7 +51,7 @@ namespace Tests.BasicTests
public void MarketplaceExample()
{
var primary = SetupCodexNodes(1)
.WithStorageQuota(10.GB())
.WithStorageQuota(11.GB())
.EnableMarketplace(initialBalance: 234.TestTokens())
.BringOnline()[0];
@ -79,13 +79,14 @@ namespace Tests.BasicTests
proofProbability: 5,
duration: TimeSpan.FromMinutes(2));
Time.Sleep(TimeSpan.FromMinutes(3));
Time.Sleep(TimeSpan.FromMinutes(1));
primary.Marketplace.AssertThatBalance(Is.LessThan(20), "Collateral was not placed.");
var primaryBalance = primary.Marketplace.GetBalance();
primary.Marketplace.AssertThatBalance(Is.LessThan(234.TestTokens()), "Collateral was not placed.");
secondary.Marketplace.AssertThatBalance(Is.LessThan(1000), "Contractor was not charged for storage.");
primary.Marketplace.AssertThatBalance(Is.GreaterThan(primaryBalance), "Storer was not paid for storage.");
Time.Sleep(TimeSpan.FromMinutes(2));
primary.Marketplace.AssertThatBalance(Is.GreaterThan(234.TestTokens()), "Storer was not paid for storage.");
secondary.Marketplace.AssertThatBalance(Is.LessThan(1000.TestTokens()), "Contractor was not charged for storage.");
}
}
}