Skip to content

Commit 809668d

Browse files
committed
fix: update
1 parent 441508d commit 809668d

File tree

6 files changed

+6
-9
lines changed

6 files changed

+6
-9
lines changed

api/src/resolvers/query_resolver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ impl QueryResolver {
944944
.arr
945945
.iter()
946946
.filter_map(|entry| {
947-
if epoch as u16 == entry.epoch {
947+
if epoch == entry.epoch {
948948
Some(ValidatorHistoryEntryResponse::from_validator_history_entry(
949949
entry,
950950
))

api/src/schemas/validator.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
use std::collections::HashMap;
2-
31
use serde::{Deserialize, Serialize};
2+
use std::collections::HashMap;
43

54
#[derive(Default, Serialize, Deserialize, Clone)]
65
pub struct JitoStakeOverTimeResponse {

core/src/constants.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ pub const JITOSOL_VALIDATOR_LIST_MAINNET: &str = "3R3nGZpQs2aZo5FDQvd2MUQ6R7KhAP
1515
pub const JITOSOL_VALIDATOR_LIST_TESTNET: &str = "G5N6K3qW86GSkNEpywcbJk42LjEZoshzECFg1LNVjSLa";
1616
pub const DATABASE_NAME: &str = "validators";
1717
pub const VALIDATOR_COLLECTION_NAME: &str = "validators";
18-
pub const BAM_VALIDATOR_COLLECTION_NAME: &str = "bam_validators";
1918
pub const STAKE_POOL_STATS_COLLECTION_NAME: &str = "stake_pool_stats";
2019
pub const VALIDATOR_REWARDS_COLLECTION_NAME: &str = "validator_rewards";
2120
pub const STAKER_REWARDS_COLLECTION_NAME: &str = "staker_rewards";

core/src/db_models/bam_validators.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use mongodb::{bson::doc, Collection};
88
use serde::{Deserialize, Serialize};
99
use solana_pubkey::{ParsePubkeyError, Pubkey};
1010

11-
use crate::{constants::BAM_VALIDATOR_COLLECTION_NAME, db_models::error::DataStoreError};
11+
use crate::db_models::error::DataStoreError;
1212

1313
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)]
1414
pub struct BamValidator {
@@ -104,7 +104,7 @@ pub struct BamValidatorStore {
104104
}
105105

106106
impl BamValidatorStore {
107-
pub const COLLECTION: &'static str = BAM_VALIDATOR_COLLECTION_NAME;
107+
pub const COLLECTION: &'static str = "bam_validators";
108108

109109
/// Initialize a [`BamValidatorStore`]
110110
pub fn new(collection: Collection<BamValidator>) -> Self {

core/src/db_models/validators.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ pub struct Validator {
2727
pub epoch: u64,
2828
pub epoch_credits: Option<u64>,
2929
pub identity_account: Option<String>,
30-
3130
pub mev_commission_bps: Option<u16>,
3231
pub mev_revenue_lamports: u64,
3332
pub priority_fee_commission_bps: Option<u16>,

core/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use mongodb::{bson::doc, options::IndexOptions, Collection, IndexModel};
2-
use serde::{Deserialize, Serialize};
2+
use serde::Deserialize;
33
pub use solana_native_token::LAMPORTS_PER_SOL;
44

55
use crate::db_models::validators::Validator;
@@ -26,7 +26,7 @@ pub async fn add_index(collection: &Collection<Validator>, key: &str) {
2626
.expect("add index failed");
2727
}
2828

29-
#[derive(Clone, Copy, Eq, PartialEq, Serialize, Deserialize, Debug)]
29+
#[derive(Clone, Copy, Eq, PartialEq, Deserialize, Debug)]
3030
pub enum SortOrder {
3131
Asc,
3232
Desc,

0 commit comments

Comments
 (0)