This commit is contained in:
benbierens 2023-09-22 07:43:46 +02:00
parent 192079f9c8
commit d2854bb905
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
2 changed files with 6 additions and 11 deletions

View File

@ -14,7 +14,7 @@ namespace GethPlugin
public GethDeployment StartGeth(GethStartupConfig gethStartupConfig) public GethDeployment StartGeth(GethStartupConfig gethStartupConfig)
{ {
Log("Starting Geth bootstrap node..."); Log("Starting Geth node...");
var startupConfig = new StartupConfig(); var startupConfig = new StartupConfig();
startupConfig.Add(gethStartupConfig); startupConfig.Add(gethStartupConfig);

View File

@ -45,10 +45,7 @@ namespace Tests.BasicTests
} }
[Test] [Test]
[Combinatorial] public void MarketplaceExample()
public void MarketplaceExample(
[Values(true, false)] bool isValidator,
[Values(true, false)] bool simulateProofFailure)
{ {
var sellerInitialBalance = 234.TestTokens(); var sellerInitialBalance = 234.TestTokens();
var buyerInitialBalance = 1000.TestTokens(); var buyerInitialBalance = 1000.TestTokens();
@ -57,12 +54,10 @@ namespace Tests.BasicTests
var geth = Ci.StartGethNode(s => s.IsMiner().WithName("disttest-geth")); var geth = Ci.StartGethNode(s => s.IsMiner().WithName("disttest-geth"));
var contracts = Ci.StartCodexContracts(geth); var contracts = Ci.StartCodexContracts(geth);
var seller = AddCodex(s => var seller = AddCodex(s => s
{ .WithStorageQuota(11.GB())
s.WithStorageQuota(11.GB()); .EnableMarketplace(geth, contracts, initialEth: 10.Eth(), initialTokens: sellerInitialBalance, isValidator: true)
s.EnableMarketplace(geth, contracts, initialEth: 10.Eth(), initialTokens: sellerInitialBalance, isValidator); .WithSimulateProofFailures(failEveryNProofs: 3));
if (simulateProofFailure) s.WithSimulateProofFailures(3);
});
AssertBalance(geth, contracts, seller, Is.EqualTo(sellerInitialBalance)); AssertBalance(geth, contracts, seller, Is.EqualTo(sellerInitialBalance));
seller.Marketplace.MakeStorageAvailable( seller.Marketplace.MakeStorageAvailable(