Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPC-470 enabling details in estimate requests and cleaning up some old properties #16

Merged
merged 2 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading