checkpoint
This commit is contained in:
		@@ -219,7 +219,7 @@ impl BucketEntryInner {
 | 
			
		||||
        // See if we have an existing signed_node_info to update or not
 | 
			
		||||
        if let Some(current_sni) = opt_current_sni {
 | 
			
		||||
            // Always allow overwriting invalid/unsigned node
 | 
			
		||||
            if current_sni.has_valid_signature() {
 | 
			
		||||
            if current_sni.has_any_signature() {
 | 
			
		||||
                // If the timestamp hasn't changed or is less, ignore this update
 | 
			
		||||
                if signed_node_info.timestamp() <= current_sni.timestamp() {
 | 
			
		||||
                    // If we received a node update with the same timestamp
 | 
			
		||||
 
 | 
			
		||||
@@ -136,7 +136,7 @@ pub trait NodeRefBase: Sized {
 | 
			
		||||
    fn signed_node_info_has_valid_signature(&self, routing_domain: RoutingDomain) -> bool {
 | 
			
		||||
        self.operate(|_rti, e| {
 | 
			
		||||
            e.signed_node_info(routing_domain)
 | 
			
		||||
                .map(|sni| sni.has_valid_signature())
 | 
			
		||||
                .map(|sni| sni.has_any_signature())
 | 
			
		||||
                .unwrap_or(false)
 | 
			
		||||
        })
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -671,7 +671,7 @@ impl RoutingTableInner {
 | 
			
		||||
        }
 | 
			
		||||
        if !allow_invalid {
 | 
			
		||||
            // verify signature
 | 
			
		||||
            if !signed_node_info.has_valid_signature() {
 | 
			
		||||
            if !signed_node_info.has_any_signature() {
 | 
			
		||||
                log_rtab!(debug "signed node info for {} has invalid signature", node_id);
 | 
			
		||||
                return None;
 | 
			
		||||
            }
 | 
			
		||||
@@ -812,7 +812,7 @@ impl RoutingTableInner {
 | 
			
		||||
            None => has_valid_own_node_info,
 | 
			
		||||
            Some(entry) => entry.with(self, |_rti, e| {
 | 
			
		||||
                e.signed_node_info(routing_domain.into())
 | 
			
		||||
                    .map(|sni| sni.has_valid_signature())
 | 
			
		||||
                    .map(|sni| sni.has_any_signature())
 | 
			
		||||
                    .unwrap_or(false)
 | 
			
		||||
            }),
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user