File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1066,8 +1066,9 @@ mod tests {
10661066
10671067 let mut state = ProposalState :: new ( proposal. clone ( ) ) ;
10681068 let total_stake = 3_000_000_000_000u64 ; // 3000 TAO
1069+ // Required: 3000 * 0.67 = 2010 TAO
10691070
1070- // Add first vote (1000 TAO) - not enough
1071+ // Add first vote (1000 TAO) - not enough (1000 < 2010)
10711072 let vote1 = ProposalVote :: accept (
10721073 proposal. id ,
10731074 "validator1" . to_string ( ) ,
@@ -1077,11 +1078,11 @@ mod tests {
10771078 state. add_vote ( vote1) ;
10781079 assert ! ( state. check_consensus( total_stake, 101 ) . is_none( ) ) ;
10791080
1080- // Add second vote (1000 TAO) - now 2000 /3000 = 67%
1081+ // Add second vote (1100 TAO) - now 2100 /3000 = 70% > 67%
10811082 let vote2 = ProposalVote :: accept (
10821083 proposal. id ,
10831084 "validator2" . to_string ( ) ,
1084- 1_000_000_000_000 ,
1085+ 1_100_000_000_000 ,
10851086 102 ,
10861087 ) ;
10871088 state. add_vote ( vote2) ;
You can’t perform that action at this time.
0 commit comments