improved stability
This commit is contained in:
		
							parent
							
								
									8ef7757267
								
							
						
					
					
						commit
						3e323cbd23
					
				| @ -190,16 +190,11 @@ impl Store { | ||||
| 
 | ||||
|     /// returns old pubkey if node got updated
 | ||||
|     async fn update_node(&self, ip: String, info: NodeInfo) -> Option<NodeInfo> { | ||||
|         // if let Some(old_node) = self.nodes.get(&ip) {
 | ||||
|         //     if SystemTime::now()
 | ||||
|         //         .duration_since(old_node.updated_at)
 | ||||
|         //         .unwrap_or(Duration::ZERO)
 | ||||
|         //         .as_secs()
 | ||||
|         //         < 50
 | ||||
|         //     {
 | ||||
|         //         return None;
 | ||||
|         //     }
 | ||||
|         // }
 | ||||
|         if let Some(old_node) = self.nodes.get(&ip) { | ||||
|             if old_node.updated_at > info.updated_at { | ||||
|                 return None; | ||||
|             } | ||||
|         } | ||||
|         self.nodes.insert(ip, info.clone()) | ||||
|     } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user