verify_precompiles needs FeatureSet

Rather than pass in individual features, pass in the entire feature set
so that we can add the ed25519 program feature in a later commit.
This commit is contained in:
Sean Young
2021-08-30 08:58:45 +01:00
parent f0be3e4ea9
commit d461a9ac10
7 changed files with 38 additions and 65 deletions

View File

@ -4928,7 +4928,7 @@ impl Bank {
}
if !skip_verification {
sanitized_tx.verify_precompiles(self.libsecp256k1_0_5_upgrade_enabled(), true)?;
sanitized_tx.verify_precompiles(&self.feature_set)?;
}
Ok(sanitized_tx)
@ -5363,16 +5363,6 @@ impl Bank {
.is_active(&feature_set::verify_tx_signatures_len::id())
}
pub fn libsecp256k1_0_5_upgrade_enabled(&self) -> bool {
self.feature_set
.is_active(&feature_set::libsecp256k1_0_5_upgrade_enabled::id())
}
pub fn libsecp256k1_fail_on_bad_count(&self) -> bool {
self.feature_set
.is_active(&feature_set::libsecp256k1_fail_on_bad_count::id())
}
pub fn merge_nonce_error_into_system_error(&self) -> bool {
self.feature_set
.is_active(&feature_set::merge_nonce_error_into_system_error::id())