Skip to content

Commit

Permalink
RPC-470 enabling details in estimate requests and cleaning up some ol…
Browse files Browse the repository at this point in the history
…d properties
  • Loading branch information
dmitriy-helius committed Dec 9, 2024
1 parent 6f3804d commit dba6286
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 204 deletions.
10 changes: 8 additions & 2 deletions src/priority_fee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::model::{
PriorityLevel, SlotPriorityFees,
};
use crate::priority_fee_calculation::Calculations;
use crate::priority_fee_calculation::Calculations::Calculation1;
use crate::priority_fee_calculation::Calculations::Calculation2;
use crate::rpc_server::get_recommended_fee;
use crate::slot_cache::SlotCache;
use cadence_macros::statsd_count;
Expand Down Expand Up @@ -231,7 +231,7 @@ impl PriorityFeeTracker {
}

fn record_general_fees(&self) {
let global_fees = self.calculate_priority_fee(&Calculation1 {
let global_fees = self.calculate_priority_fee(&Calculation2 {
accounts: &vec![],
include_vote: false,
include_empty_slots: false,
Expand Down Expand Up @@ -1472,6 +1472,8 @@ mod tests {

#[tokio::test]
async fn test_exclude_vote() {
// same test as above but with an extra slot to throw off the value
init_metrics();
let tracker = PriorityFeeTracker::new(10);

let mut fees = vec![];
Expand Down Expand Up @@ -1558,6 +1560,8 @@ mod tests {

#[tokio::test]
async fn test_exclude_vote_v2() {
// same test as above but with an extra slot to throw off the value
init_metrics();
let tracker = PriorityFeeTracker::new(10);

let mut fees = vec![];
Expand Down Expand Up @@ -1644,6 +1648,8 @@ mod tests {

#[test]
fn test_constructing_accounts() {
// same test as above but with an extra slot to throw off the value
init_metrics();
for (test_id, data) in generate_data().iter().enumerate() {
let (message_accounts, header, expectation) = data;
let result = construct_writable_accounts(message_accounts.clone(), header);
Expand Down
Loading

0 comments on commit dba6286

Please sign in to comment.