mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-01-23 21:21:03 -05:00
fix signed node info
This commit is contained in:
parent
9f917af767
commit
60c4648530
@ -181,6 +181,8 @@ 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 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
|
||||
@ -197,6 +199,7 @@ impl BucketEntryInner {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update the protocol min/max version we have
|
||||
self.min_max_version = Some((
|
||||
|
@ -149,7 +149,6 @@ impl RPCProcessor {
|
||||
)
|
||||
}
|
||||
}
|
||||
opt_sender_info = Some(sender_info.clone());
|
||||
}
|
||||
SendDataKind::Indirect => {
|
||||
// Do nothing in this case, as the socket address returned here would be for any node other than ours
|
||||
@ -158,6 +157,7 @@ impl RPCProcessor {
|
||||
// Do nothing in this case, as an existing connection could not have a different public address or it would have been reset
|
||||
}
|
||||
};
|
||||
opt_sender_info = Some(sender_info.clone());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user