File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -974,7 +974,7 @@ where
974
974
}
975
975
actions. push ( Action :: Catchup ( Round :: new ( r, self . committee . id ( ) ) ) ) ;
976
976
}
977
- } else if self . committed_round >= self . nodes . quorum ( ) {
977
+ } else if self . committed_round >= * self . nodes . quorum ( ) {
978
978
for v in self . buffer . drain_round ( r) {
979
979
self . dag . add ( v)
980
980
}
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ pub struct NodeInfo<T> {
6
6
quorum : usize ,
7
7
}
8
8
9
- impl < T : Default + PartialOrd + Clone > NodeInfo < T > {
9
+ impl < T : Default + PartialOrd > NodeInfo < T > {
10
10
pub fn new ( c : & Committee ) -> Self {
11
11
Self {
12
12
nodes : c. parties ( ) . map ( |k| ( * k, T :: default ( ) ) ) . collect ( ) ,
@@ -43,8 +43,8 @@ impl<T: Default + PartialOrd + Clone> NodeInfo<T> {
43
43
}
44
44
45
45
/// Gets the lower bound of the highest quorum interval.
46
- pub fn quorum ( & self ) -> T {
46
+ pub fn quorum ( & self ) -> & T {
47
47
debug_assert ! ( self . quorum <= self . nodes. len( ) ) ;
48
- self . nodes [ self . quorum - 1 ] . 1 . clone ( )
48
+ & self . nodes [ self . quorum - 1 ] . 1
49
49
}
50
50
}
You can’t perform that action at this time.
0 commit comments