v0.2.9-pre.010-fix.001
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-onchain-transport-lib/src/grpc_stream.rs
|
||||
// version: 2
|
||||
// version: 3
|
||||
|
||||
use tonic_prost::prost::Message; // rust-rules: trait-import
|
||||
|
||||
@@ -488,10 +488,10 @@ impl ContinuityTracker {
|
||||
}
|
||||
if self.recent_set.insert(identity.clone()) {
|
||||
self.recent_order.push_back(identity);
|
||||
if self.recent_order.len() > MAX_RECENT_UPDATE_IDENTITIES {
|
||||
if let std::option::Option::Some(oldest) = self.recent_order.pop_front() {
|
||||
self.recent_set.remove(&oldest);
|
||||
}
|
||||
if self.recent_order.len() > MAX_RECENT_UPDATE_IDENTITIES
|
||||
&& let std::option::Option::Some(oldest) = self.recent_order.pop_front()
|
||||
{
|
||||
self.recent_set.remove(&oldest);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -534,11 +534,11 @@ async fn run_subscribe_actor(
|
||||
return;
|
||||
},
|
||||
};
|
||||
if matches!(&update, crate::YellowstoneSubscribeUpdate::Ping(_)) {
|
||||
if let std::result::Result::Err(code) = send_automatic_ping(&request_state, settings.max_outbound_message_size_bytes()) {
|
||||
fail_actor(code, &request_state, &mut snapshot, &snapshot_tx);
|
||||
return;
|
||||
}
|
||||
if matches!(&update, crate::YellowstoneSubscribeUpdate::Ping(_))
|
||||
&& let std::result::Result::Err(code) = send_automatic_ping(&request_state, settings.max_outbound_message_size_bytes())
|
||||
{
|
||||
fail_actor(code, &request_state, &mut snapshot, &snapshot_tx);
|
||||
return;
|
||||
}
|
||||
tracker.observe(&update, &mut snapshot);
|
||||
snapshot_tx.send_replace(snapshot);
|
||||
|
||||
Reference in New Issue
Block a user