pub struct Config {
pub after_genesis: bool,
}Expand description
Script configuration limits.
Fields§
§after_genesis: boolWhether post-genesis rules are active (relaxes most limits).
Implementations§
Source§impl Config
impl Config
Sourcepub fn before_genesis() -> Self
pub fn before_genesis() -> Self
Create a configuration with pre-genesis (legacy) limits.
Sourcepub fn after_genesis() -> Self
pub fn after_genesis() -> Self
Create a configuration with post-genesis (relaxed) limits.
Sourcepub fn max_ops(&self) -> usize
pub fn max_ops(&self) -> usize
Return the maximum number of non-push opcodes allowed per script.
Sourcepub fn max_stack_size(&self) -> usize
pub fn max_stack_size(&self) -> usize
Return the maximum combined stack size (data + alt).
Sourcepub fn max_script_size(&self) -> usize
pub fn max_script_size(&self) -> usize
Return the maximum script byte size.
Sourcepub fn max_script_element_size(&self) -> usize
pub fn max_script_element_size(&self) -> usize
Return the maximum byte size for a single data element.
Sourcepub fn max_script_number_length(&self) -> usize
pub fn max_script_number_length(&self) -> usize
Return the maximum byte length for numeric script values.
Sourcepub fn max_pub_keys_per_multisig(&self) -> usize
pub fn max_pub_keys_per_multisig(&self) -> usize
Return the maximum number of public keys in a multisig operation.
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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