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

Method validate

crates/execution/txpool/src/validity.rs:292–300  ·  view source on GitHub ↗
(&self, max_items: usize)

Source from the content-addressed store, hash-verified

290 }
291
292 fn validate(&self, max_items: usize) -> Result<(), ExtensionError> {
293 if self.validity.len() > max_items {
294 return Err(ExtensionError(format!(
295 "too many validity predicates: {} (maximum {max_items})",
296 self.validity.len()
297 )));
298 }
299 Ok(())
300 }
301
302 fn extract(tx: &ValidPoolTransaction<BasePooledTransaction>) -> Self {
303 Self { validity: tx.transaction.validity_predicates().to_vec() }

Calls 2

ExtensionErrorClass · 0.85
lenMethod · 0.45

Tested by 1