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

Method apply

crates/execution/txpool/src/validity.rs:314–319  ·  view source on GitHub ↗

Applies the predicates to the builder-inbound transaction. This is the builder RPC ingress path, distinct from the mempool node's `base_sendRawTransactionValidity`. The count bound is enforced separately by [`Self::validate`]; here each predicate's parameters are re-checked as defense-in-depth against a misbehaving upstream. Unlike the mempool ingress, an empty predicate set is not rejected: the

(self, tx: BasePooledTransaction)

Source from the content-addressed store, hash-verified

312 /// ingress, an empty predicate set is not rejected: the builder legitimately
313 /// receives ordinary transactions that carry no predicates.
314 fn apply(self, tx: BasePooledTransaction) -> Result<BasePooledTransaction, ExtensionError> {
315 for (index, predicate) in self.validity.iter().enumerate() {
316 predicate.validate_params(index).map_err(|e| ExtensionError(e.to_string()))?;
317 }
318 Ok(tx.with_validity_predicates(self.validity))
319 }
320}
321
322#[cfg(test)]

Calls 4

ExtensionErrorClass · 0.85
validate_paramsMethod · 0.80
iterMethod · 0.45