File tree 1 file changed +6
-11
lines changed
1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -2507,10 +2507,8 @@ impl ClusterInfo {
2507
2507
} ;
2508
2508
let mut verify_node_instance = |value : & CrdsValue | {
2509
2509
if self . verify_node_instance ( value) {
2510
- info ! ( "greg: node instance verify good" ) ;
2511
2510
true
2512
2511
} else {
2513
- info ! ( "greg: node instance verify bad" ) ;
2514
2512
self . stats . num_unverifed_node_instances . add_relaxed ( 1 ) ;
2515
2513
false
2516
2514
}
@@ -2595,16 +2593,13 @@ impl ClusterInfo {
2595
2593
CrdsData :: NodeInstance ( node) => node. from ( ) ,
2596
2594
_ => return true , // If not a NodeInstance, nothing to verify.
2597
2595
} ;
2598
- match self . lookup_contact_info ( pubkey, |ci| ci. clone ( ) ) {
2599
- Some ( _) => {
2600
- info ! ( "greg: got contact info for pk: {pubkey:?}" ) ;
2601
- true
2602
- } ,
2603
- None => {
2604
- info ! ( "greg: no contact info for pk: {pubkey:?}" ) ;
2605
- false // Need to receive contact info first
2606
- }
2596
+ // if contact info for the pubkey exists in the crds table, then the
2597
+ // the contact info has already been verified. Therefore, the node
2598
+ // instance is valid.
2599
+ if self . lookup_contact_info ( pubkey, |ci| ci. clone ( ) ) . is_some ( ) {
2600
+ return true ;
2607
2601
}
2602
+ false
2608
2603
}
2609
2604
2610
2605
// Consumes packets received from the socket, deserializing, sanitizing and
You can’t perform that action at this time.
0 commit comments