mirror of
https://github.com/logos-storage/logos-storage-nim-cs-dist-tests.git
synced 2026-05-28 03:59:27 +00:00
merge finished
This commit is contained in:
parent
3822d5e2eb
commit
64d271c809
@ -47,7 +47,7 @@ namespace CodexContractsPlugin.ChainMonitor
|
||||
handler = changeHandler;
|
||||
this.doProofPeriodMonitoring = doProofPeriodMonitoring;
|
||||
TotalSpan = new TimeRange(startUtc, startUtc);
|
||||
PeriodMonitor = new PeriodMonitor(contracts);
|
||||
PeriodMonitor = new PeriodMonitor(log, contracts);
|
||||
}
|
||||
|
||||
public TimeRange TotalSpan { get; private set; }
|
||||
|
||||
@ -96,7 +96,8 @@ namespace CodexContractsPlugin.Marketplace
|
||||
|
||||
public partial class MarketplaceConfig : IMarketplaceConfigInput
|
||||
{
|
||||
|
||||
public int MaxNumberOfSlashes => this.Collateral.MaxNumberOfSlashes;
|
||||
public TimeSpan PeriodDuration => TimeSpan.FromSeconds(this.Proofs.Period);
|
||||
}
|
||||
}
|
||||
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||
|
||||
@ -53,11 +53,15 @@ namespace CodexReleaseTests.Utils
|
||||
protected abstract ByteSize HostAvailabilitySize { get; }
|
||||
protected abstract TimeSpan HostAvailabilityMaxDuration { get; }
|
||||
protected virtual bool MonitorChainState { get; } = true;
|
||||
protected TimeSpan HostBlockTTL { get; } = TimeSpan.FromMinutes(1.0);
|
||||
|
||||
public ICodexNodeGroup StartHosts()
|
||||
{
|
||||
var hosts = StartCodex(NumberOfHosts, s => s
|
||||
.WithName("host")
|
||||
.WithBlockTTL(HostBlockTTL)
|
||||
.WithBlockMaintenanceNumber(1000)
|
||||
.WithBlockMaintenanceInterval(HostBlockTTL / 2)
|
||||
.EnableMarketplace(GetGeth(), GetContracts(), m => m
|
||||
.WithInitial(StartingBalanceEth.Eth(), StartingBalanceTST.Tst())
|
||||
.AsStorageNode()
|
||||
@ -70,7 +74,7 @@ namespace CodexReleaseTests.Utils
|
||||
AssertTstBalance(host, StartingBalanceTST.Tst(), nameof(StartHosts));
|
||||
AssertEthBalance(host, StartingBalanceEth.Eth(), nameof(StartHosts));
|
||||
|
||||
host.Marketplace.MakeStorageAvailable(new StorageAvailability(
|
||||
host.Marketplace.MakeStorageAvailable(new CreateStorageAvailability(
|
||||
totalSpace: HostAvailabilitySize,
|
||||
maxDuration: HostAvailabilityMaxDuration,
|
||||
minPricePerBytePerSecond: 1.TstWei(),
|
||||
@ -84,6 +88,9 @@ namespace CodexReleaseTests.Utils
|
||||
{
|
||||
var host = StartCodex(s => s
|
||||
.WithName("singlehost")
|
||||
.WithBlockTTL(HostBlockTTL)
|
||||
.WithBlockMaintenanceNumber(1000)
|
||||
.WithBlockMaintenanceInterval(HostBlockTTL / 2)
|
||||
.EnableMarketplace(GetGeth(), GetContracts(), m => m
|
||||
.WithInitial(StartingBalanceEth.Eth(), StartingBalanceTST.Tst())
|
||||
.AsStorageNode()
|
||||
@ -94,7 +101,7 @@ namespace CodexReleaseTests.Utils
|
||||
AssertTstBalance(host, StartingBalanceTST.Tst(), nameof(StartOneHost));
|
||||
AssertEthBalance(host, StartingBalanceEth.Eth(), nameof(StartOneHost));
|
||||
|
||||
host.Marketplace.MakeStorageAvailable(new StorageAvailability(
|
||||
host.Marketplace.MakeStorageAvailable(new CreateStorageAvailability(
|
||||
totalSpace: HostAvailabilitySize,
|
||||
maxDuration: HostAvailabilityMaxDuration,
|
||||
minPricePerBytePerSecond: 1.TstWei(),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user