@@ -4,7 +4,7 @@ use reqwest::header::HeaderValue;
44use yaml_rust:: { Yaml , YamlLoader } ;
55
66pub struct PoolParameters {
7- pub number_of_oracles : u64 ,
7+ pub minimum_pool_box_value : u64 ,
88 pub oracle_payout_price : NanoErg ,
99 pub live_epoch_length : BlockDuration ,
1010 pub epoch_preparation_length : BlockDuration ,
@@ -36,14 +36,14 @@ impl PoolParameters {
3636 let price = config[ "oracle_payout_price" ]
3737 . as_i64 ( )
3838 . expect ( "No oracle_payout_price specified in config file." ) ;
39- let num = config[ "number_of_oracles " ]
39+ let num = config[ "minimum_pool_box_value " ]
4040 . as_i64 ( )
41- . expect ( "No number_of_oracles specified in config file." ) ;
41+ . expect ( "No minimum_pool_box_value specified in config file." ) ;
4242 let base_fee = config[ "base_fee" ]
4343 . as_i64 ( )
4444 . expect ( "No base_fee specified in config file." ) ;
4545 PoolParameters {
46- number_of_oracles : num as u64 ,
46+ minimum_pool_box_value : num as u64 ,
4747 oracle_payout_price : price as u64 ,
4848 live_epoch_length : lel as u64 ,
4949 epoch_preparation_length : epl as u64 ,
@@ -52,12 +52,6 @@ impl PoolParameters {
5252 base_fee : base_fee as u64 ,
5353 }
5454 }
55-
56- /// Calculates the maximum total payout that the oracle pool will require
57- /// in order to payout all of the oracles + the collector.
58- pub fn max_pool_payout ( & self ) -> NanoErg {
59- self . oracle_payout_price * ( self . number_of_oracles + 1 )
60- }
6155}
6256
6357/// Returns "core_api_port" from the config file
@@ -111,7 +105,7 @@ mod tests {
111105 #[ test]
112106 fn pool_parameter_parsing_works ( ) {
113107 let yaml_string = "
114- number_of_oracles: 4
108+ minimum_pool_box_value: 10000000
115109 live_epoch_length: 20
116110 epoch_preparation_length: 10
117111 buffer_length: 4
@@ -124,7 +118,7 @@ mod tests {
124118 assert_eq ! ( pool_params. live_epoch_length, 20 ) ;
125119 assert_eq ! ( pool_params. epoch_preparation_length, 10 ) ;
126120 assert_eq ! ( pool_params. buffer_length, 4 ) ;
127- assert_eq ! ( pool_params. number_of_oracles , 4 ) ;
121+ assert_eq ! ( pool_params. minimum_pool_box_value , 10000000 ) ;
128122 assert_eq ! ( pool_params. outlier_range, 10 ) ;
129123 assert_eq ! ( pool_params. oracle_payout_price, 1000000 ) ;
130124 assert_eq ! ( pool_params. base_fee, 1000000 ) ;
0 commit comments