Revert "Added vote limits to be 75% of total block limit"

This reverts commit 3e131a5324.
This commit is contained in:
Tao Zhu
2022-01-18 13:13:23 -06:00
committed by Trent Nelson
parent aabcdcf8fb
commit fc8f61368d
5 changed files with 60 additions and 142 deletions

View File

@@ -31,7 +31,6 @@ use {
cost_model::CostModel,
cost_tracker::CostTracker,
hardened_unpack::{open_genesis_config, MAX_GENESIS_ARCHIVE_UNPACKED_SIZE},
hashed_transaction::HashedTransaction,
snapshot_utils::{self, SnapshotVersion, DEFAULT_MAX_SNAPSHOTS_TO_RETAIN},
},
solana_sdk::{
@@ -756,9 +755,7 @@ fn compute_slot_cost(blockstore: &Blockstore, slot: Slot) -> Result<(), String>
for transaction in &entry.transactions {
programs += transaction.message().instructions.len();
let tx_cost = cost_model.calculate_cost(transaction, true);
let hashed_transaction = HashedTransaction::from(transaction);
let result =
cost_tracker.try_add(hashed_transaction.is_simple_vote_transaction(), &tx_cost);
let result = cost_tracker.try_add(transaction, &tx_cost);
if result.is_err() {
println!(
"Slot: {}, CostModel rejected transaction {:?}, reason {:?}",