pub struct SvmFeatureConfig {
pub enable: Vec<Pubkey>,
pub disable: Vec<Pubkey>,
}Expand description
Overrides applied on top of LiteSVM’s mainnet-beta feature baseline.
surfpool’s SVM is constructed with the mainnet-beta feature set already
active (see [litesvm::LiteSVM::mainnet_feature_set]). This struct
expresses the user’s deltas relative to that baseline:
- features listed in
enableare activated on top of the mainnet baseline (typically features that have not yet shipped to mainnet); - features listed in
disableare deactivated from the mainnet baseline (typically to reproduce older program behavior).
The default value is an empty override set, meaning “run with exactly the mainnet baseline.”
Fields§
§enable: Vec<Pubkey>Features to activate on top of the mainnet baseline.
disable: Vec<Pubkey>Features to deactivate from the mainnet baseline.
Implementations§
Source§impl SvmFeatureConfig
impl SvmFeatureConfig
Sourcepub fn enable(self, feature: Pubkey) -> Self
pub fn enable(self, feature: Pubkey) -> Self
Adds a feature to enable on top of the mainnet baseline.
Sourcepub fn disable(self, feature: Pubkey) -> Self
pub fn disable(self, feature: Pubkey) -> Self
Adds a feature to disable from the mainnet baseline.
Sourcepub fn is_enabled(&self, feature: &Pubkey) -> Option<bool>
pub fn is_enabled(&self, feature: &Pubkey) -> Option<bool>
Checks if a feature should be enabled based on this configuration. Returns None if not explicitly configured (use default).
Sourcepub fn all_features_enabled() -> Self
pub fn all_features_enabled() -> Self
Returns a config with every known agave feature gate explicitly enabled.
Mirrors the CLI’s --features-all flag.
Trait Implementations§
Source§impl Clone for SvmFeatureConfig
impl Clone for SvmFeatureConfig
Source§fn clone(&self) -> SvmFeatureConfig
fn clone(&self) -> SvmFeatureConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SvmFeatureConfig
impl Debug for SvmFeatureConfig
Source§impl Default for SvmFeatureConfig
impl Default for SvmFeatureConfig
Source§fn default() -> SvmFeatureConfig
fn default() -> SvmFeatureConfig
Source§impl<'de> Deserialize<'de> for SvmFeatureConfig
impl<'de> Deserialize<'de> for SvmFeatureConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for SvmFeatureConfig
impl PartialEq for SvmFeatureConfig
Source§fn eq(&self, other: &SvmFeatureConfig) -> bool
fn eq(&self, other: &SvmFeatureConfig) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for SvmFeatureConfig
impl Serialize for SvmFeatureConfig
impl Eq for SvmFeatureConfig
impl StructuralPartialEq for SvmFeatureConfig
Auto Trait Implementations§
impl Freeze for SvmFeatureConfig
impl RefUnwindSafe for SvmFeatureConfig
impl Send for SvmFeatureConfig
impl Sync for SvmFeatureConfig
impl Unpin for SvmFeatureConfig
impl UnsafeUnpin for SvmFeatureConfig
impl UnwindSafe for SvmFeatureConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more