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

Method try_enqueue

crates/execution/tx-forwarding/src/reader/task.rs:258–265  ·  view source on GitHub ↗

Attempts to queue the transaction without waiting on a stale pool snapshot.

(
        &self,
        transaction: &Arc<ValidPoolTransaction<P::Transaction>>,
    )

Source from the content-addressed store, hash-verified

256
257 /// Attempts to queue the transaction without waiting on a stale pool snapshot.
258 fn try_enqueue(
259 &self,
260 transaction: &Arc<ValidPoolTransaction<P::Transaction>>,
261 ) -> Result<(), mpsc::error::TrySendError<()>> {
262 let permit = self.sender.try_reserve()?;
263 permit.send(Self::to_wire(transaction));
264 Ok(())
265 }
266
267 /// Converts a pooled transaction into the request the forwarder relays.
268 ///

Callers 1

fill_queueMethod · 0.80

Calls 2

try_reserveMethod · 0.80
sendMethod · 0.45

Tested by

no test coverage detected