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