File tree Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ msgs_find_limit = 10
8
8
9
9
heartbeat_time = 30000
10
10
health_threshold_promilles = 950
11
+ health_unsignable_promilles = 750
11
12
propagation_timeout = 1000
12
13
13
14
list_timeout = 5000
@@ -24,4 +25,4 @@ creators_whitelist = []
24
25
minimal_deposit = " 0"
25
26
minimal_fee = " 0"
26
27
token_address_whitelist = []
27
- validators_whitelist = []
28
+ validators_whitelist = []
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ msgs_find_limit = 10
10
10
11
11
heartbeat_time = 60000
12
12
health_threshold_promilles = 970
13
+ health_unsignable_promilles = 770
13
14
propagation_timeout = 3000
14
15
15
16
list_timeout = 10000
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ pub struct Config {
25
25
pub channels_find_limit : u32 ,
26
26
pub events_find_limit : u32 ,
27
27
pub health_threshold_promilles : u32 ,
28
+ pub health_unsignable_promilles : u32 ,
28
29
pub propagation_timeout : u32 ,
29
30
pub fetch_timeout : u32 ,
30
31
pub list_timeout : u32 ,
Original file line number Diff line number Diff line change @@ -84,14 +84,13 @@ async fn on_new_state<'a, A: Adapter + 'static>(
84
84
}
85
85
86
86
let health = get_health ( & iface. channel , balances, & proposed_balances) ;
87
- // @TODO: don't hardcode that
88
- if health < ( 750 as u64 ) . into ( ) {
87
+ if health < u64:: from ( iface. config . health_unsignable_promilles ) . into ( ) {
89
88
return Ok ( on_error ( & iface, & new_state, InvalidNewState :: Health ) . await ) ;
90
89
}
91
90
92
91
let signature = iface. adapter . sign ( & new_state. state_root ) ?;
93
- let health_threshold = u64:: from ( iface. config . health_threshold_promilles ) . into ( ) ;
94
- let is_healthy = & health >= & health_threshold;
92
+ let health_threshold = u64:: from ( iface. config . health_threshold_promilles ) ;
93
+ let is_healthy = health >= health_threshold;
95
94
96
95
iface
97
96
. propagate ( & [ & MessageTypes :: ApproveState ( ApproveState {
You can’t perform that action at this time.
0 commit comments