File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,7 @@ pub enum NoVoteReason {
233233 ExtraIB ,
234234 MissingIB ,
235235 MissingEB ,
236+ UncertifiedEBReference ,
236237}
237238
238239#[ derive( Clone , Debug , Serialize ) ]
Original file line number Diff line number Diff line change @@ -1420,6 +1420,17 @@ impl Node {
14201420 }
14211421 }
14221422 }
1423+
1424+ // If this EB _does_ reference other EBs, make sure we trust them
1425+ for referenced_eb in & eb. ebs {
1426+ let Some ( votes) = self . leios . votes_by_eb . get ( referenced_eb) else {
1427+ return Err ( NoVoteReason :: UncertifiedEBReference ) ;
1428+ } ;
1429+ let vote_count = votes. values ( ) . copied ( ) . sum :: < usize > ( ) as u64 ;
1430+ if vote_count < self . sim_config . vote_threshold {
1431+ return Err ( NoVoteReason :: UncertifiedEBReference ) ;
1432+ }
1433+ }
14231434 Ok ( ( ) )
14241435 }
14251436
You can’t perform that action at this time.
0 commit comments