From 5862dffdb1b1d538527600ea95fe159872fe6ab5 Mon Sep 17 00:00:00 2001 From: Tao Zhu Date: Tue, 12 Sep 2023 22:36:56 +0000 Subject: [PATCH] remove is_simple_vote flag from transaction UsageCostDetails --- cost-model/src/cost_model.rs | 1 - cost-model/src/transaction_cost.rs | 3 --- 2 files changed, 4 deletions(-) diff --git a/cost-model/src/cost_model.rs b/cost-model/src/cost_model.rs index 0ac75808dc7255..a1f88db2f3febd 100644 --- a/cost-model/src/cost_model.rs +++ b/cost-model/src/cost_model.rs @@ -47,7 +47,6 @@ impl CostModel { Self::get_write_lock_cost(&mut tx_cost, transaction); Self::get_transaction_cost(&mut tx_cost, transaction, feature_set); tx_cost.account_data_size = Self::calculate_account_data_size(transaction); - tx_cost.is_simple_vote = transaction.is_simple_vote_transaction(); debug!("transaction {:?} has cost {:?}", transaction, tx_cost); TransactionCost::Transaction(tx_cost) diff --git a/cost-model/src/transaction_cost.rs b/cost-model/src/transaction_cost.rs index ef37e6fa3c3569..477d5edaed2323 100644 --- a/cost-model/src/transaction_cost.rs +++ b/cost-model/src/transaction_cost.rs @@ -106,7 +106,6 @@ pub struct UsageCostDetails { pub bpf_execution_cost: u64, pub loaded_accounts_data_size_cost: u64, pub account_data_size: u64, - pub is_simple_vote: bool, } impl Default for UsageCostDetails { @@ -120,7 +119,6 @@ impl Default for UsageCostDetails { bpf_execution_cost: 0u64, loaded_accounts_data_size_cost: 0u64, account_data_size: 0u64, - is_simple_vote: false, } } } @@ -139,7 +137,6 @@ impl PartialEq for UsageCostDetails { && self.bpf_execution_cost == other.bpf_execution_cost && self.loaded_accounts_data_size_cost == other.loaded_accounts_data_size_cost && self.account_data_size == other.account_data_size - && self.is_simple_vote == other.is_simple_vote && to_hash_set(&self.writable_accounts) == to_hash_set(&other.writable_accounts) } }