Skip to content

Commit

Permalink
Return to tracking clients as soon as they submit a proposeTX, per Ja…
Browse files Browse the repository at this point in the history
…mes' suggestion
  • Loading branch information
NotGyro committed Mar 27, 2023
1 parent 8b2b437 commit d818079
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions consensus/service/src/api/client_api_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,16 @@ impl ConsensusClientApi for ClientApiService {
) {
let _timer = SVC_COUNTERS.req(&ctx);

{
let session = ClientSession::from(msg.channel_id.clone());
let mut tracker = self.tracked_sessions.lock().expect("Mutex poisoned");
// Calling get() on the LRU bumps the entry to show up as more
// recently-used.
if tracker.get(&session).is_none() {
tracker.put(session, ClientSessionTracking::new());
}
}

if let Err(err) = check_request_chain_id(&self.config.chain_id, &ctx) {
return send_result(ctx, sink, Err(err), &self.logger);
}
Expand Down

0 comments on commit d818079

Please sign in to comment.