Skip to content

Commit

Permalink
add comment about storing initial top hash
Browse files Browse the repository at this point in the history
  • Loading branch information
clangenb committed Oct 26, 2024
1 parent 68e5da7 commit 876ffdd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/direct-rpc-server/src/rpc_responder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ where
self.encode_and_send_subscription_update(connection_token, &sub)?;

if do_watch {
// We just store back the initial response, which is the top hash.
// This was implemented before we added the `RpcSubscriptionUpdate`
// and should probably be refactored in the future.
//
// But for now this is fine, as we only use it to track ongoing connections.
self.connection_registry.store(hash, connection_token, rpc_response);
}

Expand Down

0 comments on commit 876ffdd

Please sign in to comment.