fix merge conflicts

This commit is contained in:
Tao Zhu
2022-04-08 16:20:12 -05:00
committed by Tao Zhu
parent 671e9cbac1
commit e02542003d
4 changed files with 3 additions and 343 deletions

View File

@ -2860,7 +2860,8 @@ mod tests {
poh_recorder.lock().unwrap().set_bank(&bank);
let (gossip_vote_sender, _gossip_vote_receiver) = unbounded();
let qos_service = QosService::new(Arc::new(RwLock::new(CostModel::default())), 1);
let qos_service =
Arc::new(QosService::new(Arc::new(RwLock::new(CostModel::default()))));
let get_block_cost = || bank.read_cost_tracker().unwrap().block_cost();
let get_tx_count = || bank.read_cost_tracker().unwrap().transaction_count();

View File

@ -151,12 +151,6 @@ impl QosService {
(select_results, num_included)
}
<<<<<<< HEAD
<<<<<<< HEAD
=======
pub fn commit_transaction_cost(
&self,
=======
/// Update the transaction cost in the cost_tracker with the real cost for
/// transactions that were executed successfully;
/// Otherwise remove the cost from the cost tracker, therefore preventing cost_tracker
@ -165,7 +159,6 @@ impl QosService {
transaction_costs: impl Iterator<Item = &'a TransactionCost>,
transaction_qos_results: impl Iterator<Item = &'a transaction::Result<()>>,
retryable_transaction_indexes: &[usize],
>>>>>>> 924b8ea1e (Adjustments to cost_tracker updates)
bank: &Arc<Bank>,
) {
let mut cost_tracker = bank.write_cost_tracker().unwrap();
@ -187,14 +180,6 @@ impl QosService {
});
}
// metrics are reported by bank slot
pub fn report_metrics(&self, bank: Arc<Bank>) {
self.report_sender
.send(QosMetrics::BlockBatchUpdate { bank })
.unwrap_or_else(|err| warn!("qos service report metrics failed: {:?}", err));
}
>>>>>>> 9e07272af (- Only commit successfully executed transactions' cost to cost_tracker;)
pub fn accumulate_estimated_transaction_costs(
&self,
cost_details: &BatchedTransactionCostDetails,