@@ -53,11 +53,15 @@ protected TimeSpan GetPeriodDuration()
53
53
protected abstract ByteSize HostAvailabilitySize { get ; }
54
54
protected abstract TimeSpan HostAvailabilityMaxDuration { get ; }
55
55
protected virtual bool MonitorChainState { get ; } = true ;
56
+ protected TimeSpan HostBlockTTL { get ; } = TimeSpan . FromMinutes ( 1.0 ) ;
56
57
57
58
public ICodexNodeGroup StartHosts ( )
58
59
{
59
60
var hosts = StartCodex ( NumberOfHosts , s => s
60
61
. WithName ( "host" )
62
+ . WithBlockTTL ( HostBlockTTL )
63
+ . WithBlockMaintenanceNumber ( 1000 )
64
+ . WithBlockMaintenanceInterval ( HostBlockTTL / 2 )
61
65
. EnableMarketplace ( GetGeth ( ) , GetContracts ( ) , m => m
62
66
. WithInitial ( StartingBalanceEth . Eth ( ) , StartingBalanceTST . Tst ( ) )
63
67
. AsStorageNode ( )
@@ -70,7 +74,7 @@ public ICodexNodeGroup StartHosts()
70
74
AssertTstBalance ( host , StartingBalanceTST . Tst ( ) , nameof ( StartHosts ) ) ;
71
75
AssertEthBalance ( host , StartingBalanceEth . Eth ( ) , nameof ( StartHosts ) ) ;
72
76
73
- host . Marketplace . MakeStorageAvailable ( new StorageAvailability (
77
+ host . Marketplace . MakeStorageAvailable ( new CreateStorageAvailability (
74
78
totalSpace : HostAvailabilitySize ,
75
79
maxDuration : HostAvailabilityMaxDuration ,
76
80
minPricePerBytePerSecond : 1 . TstWei ( ) ,
@@ -84,6 +88,9 @@ public ICodexNode StartOneHost()
84
88
{
85
89
var host = StartCodex ( s => s
86
90
. WithName ( "singlehost" )
91
+ . WithBlockTTL ( HostBlockTTL )
92
+ . WithBlockMaintenanceNumber ( 1000 )
93
+ . WithBlockMaintenanceInterval ( HostBlockTTL / 2 )
87
94
. EnableMarketplace ( GetGeth ( ) , GetContracts ( ) , m => m
88
95
. WithInitial ( StartingBalanceEth . Eth ( ) , StartingBalanceTST . Tst ( ) )
89
96
. AsStorageNode ( )
@@ -94,7 +101,7 @@ public ICodexNode StartOneHost()
94
101
AssertTstBalance ( host , StartingBalanceTST . Tst ( ) , nameof ( StartOneHost ) ) ;
95
102
AssertEthBalance ( host , StartingBalanceEth . Eth ( ) , nameof ( StartOneHost ) ) ;
96
103
97
- host . Marketplace . MakeStorageAvailable ( new StorageAvailability (
104
+ host . Marketplace . MakeStorageAvailable ( new CreateStorageAvailability (
98
105
totalSpace : HostAvailabilitySize ,
99
106
maxDuration : HostAvailabilityMaxDuration ,
100
107
minPricePerBytePerSecond : 1 . TstWei ( ) ,
0 commit comments