MCPcopy Create free account
hub / github.com/base/base / new

Method new

crates/execution/payload/src/rejection_cache.rs:42–44  ·  view source on GitHub ↗

Creates a new [`RejectionCache`] with the given capacity and TTL.

(max_capacity: u64, ttl: Duration)

Source from the content-addressed store, hash-verified

40impl RejectionCache {
41 /// Creates a new [`RejectionCache`] with the given capacity and TTL.
42 pub fn new(max_capacity: u64, ttl: Duration) -> Self {
43 Self(Cache::builder().max_capacity(max_capacity).time_to_live(ttl).build())
44 }
45
46 /// Returns `true` if `hash` is cached as permanently rejected.
47 pub fn is_rejected(&self, hash: &TxHash) -> bool {

Callers

nothing calls this directly

Calls 2

builderFunction · 0.50
buildMethod · 0.45

Tested by

no test coverage detected