Remove feature switch for secp256k1 program (#18467)

* Remove feature switch for secp256k1 program

* fix tests
This commit is contained in:
Justin Starry
2021-07-09 10:08:03 -05:00
committed by GitHub
parent 4e1333fbe6
commit fd574dcb3b
10 changed files with 41 additions and 103 deletions

View File

@@ -25,7 +25,7 @@ use solana_sdk::{
bpf_loader_upgradeable::{self, UpgradeableLoaderState},
clock::{BankId, Slot, INITIAL_RENT_EPOCH},
feature_set::{self, FeatureSet},
fee_calculator::{FeeCalculator, FeeConfig},
fee_calculator::FeeCalculator,
genesis_config::ClusterType,
hash::Hash,
message::{Message, MessageProgramIdsCache},
@@ -420,10 +420,6 @@ impl Accounts {
rent_collector: &RentCollector,
feature_set: &FeatureSet,
) -> Vec<TransactionLoadResult> {
let fee_config = FeeConfig {
secp256k1_program_enabled: feature_set
.is_active(&feature_set::secp256k1_program_enabled::id()),
};
txs.zip(lock_results)
.map(|etx| match etx {
(tx, (Ok(()), nonce_rollback)) => {
@@ -436,7 +432,7 @@ impl Accounts {
.cloned()
});
let fee = if let Some(fee_calculator) = fee_calculator {
fee_calculator.calculate_fee_with_config(tx.message(), &fee_config)
fee_calculator.calculate_fee(tx.message())
} else {
return (Err(TransactionError::BlockhashNotFound), None);
};