Skip to main content

Module dedup

Module dedup 

Source
Expand description

Request deduplication — coalesces identical in-flight RPC requests.

When multiple callers issue the same request concurrently, only one actual transport call is made. All waiters receive a clone of the result.

§Key design

  • A request is identified by hash(method, params) (same scheme as cache).
  • In-flight tracking uses tokio::sync::watch channels: the first caller creates a channel and sends the result; subsequent callers subscribe.
  • After the result is broadcast, the entry is removed from the pending map.

Structs§

DedupTransport
Deduplicates identical in-flight RPC requests.