pub struct InMemoryEip3009NonceStore { /* private fields */ }Expand description
Process-local single-use EIP-3009 nonce store.
Backed by Mutex<Eip3009NonceMap>. Suitable for tests and
explicitly ephemeral single-process deployments. No durable implementation
is provided in-tree; production callers must supply durable replay protection
before broadcast.
Implementations§
Source§impl InMemoryEip3009NonceStore
impl InMemoryEip3009NonceStore
Sourcepub fn with_max_entries(max_entries: usize) -> Self
pub fn with_max_entries(max_entries: usize) -> Self
Build a fresh store with a custom hard capacity.
Trait Implementations§
Source§impl Default for InMemoryEip3009NonceStore
impl Default for InMemoryEip3009NonceStore
Source§impl Eip3009NonceStore for InMemoryEip3009NonceStore
impl Eip3009NonceStore for InMemoryEip3009NonceStore
Source§fn record_if_fresh(
&self,
from_address: &str,
nonce: &str,
retain_until_unix_seconds: u64,
) -> Result<NonceOutcome, SettlementError>
fn record_if_fresh( &self, from_address: &str, nonce: &str, retain_until_unix_seconds: u64, ) -> Result<NonceOutcome, SettlementError>
Record
(from_address, nonce) for replay detection. Read moreSource§fn gc_expired(&self, now_unix_seconds: u64) -> Result<usize, SettlementError>
fn gc_expired(&self, now_unix_seconds: u64) -> Result<usize, SettlementError>
Sweep entries whose retention bound is below
now_unix_seconds. Read moreAuto Trait Implementations§
impl !Freeze for InMemoryEip3009NonceStore
impl RefUnwindSafe for InMemoryEip3009NonceStore
impl Send for InMemoryEip3009NonceStore
impl Sync for InMemoryEip3009NonceStore
impl Unpin for InMemoryEip3009NonceStore
impl UnsafeUnpin for InMemoryEip3009NonceStore
impl UnwindSafe for InMemoryEip3009NonceStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more