Skip to content

Commit

Permalink
Merge pull request #61 from rpcpool/clean_unused_imports
Browse files Browse the repository at this point in the history
Fixing unused imports
  • Loading branch information
linuskendall authored May 9, 2023
2 parents e1d0721 + 6b27694 commit 61acd9e
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 27 deletions.
1 change: 0 additions & 1 deletion digital_asset_types/src/dao/full_asset.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use crate::dao::{asset, asset_authority, asset_creators, asset_data, asset_grouping};
use sea_orm::FromQueryResult;

#[derive(Clone, Debug, PartialEq)]
pub struct FullAsset {
Expand Down
3 changes: 0 additions & 3 deletions digital_asset_types/src/dao/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,16 @@ mod generated;
pub mod scopes;
pub use full_asset::*;
pub use generated::*;
use solana_sdk::pubkey::Pubkey;

use self::sea_orm_active_enums::{
OwnerType, RoyaltyTargetType, SpecificationAssetClass, SpecificationVersions,
};
use sea_orm::{
entity::*,
query::*,
sea_query::Expr,
sea_query::{ConditionType, IntoCondition},
Condition, DbErr, RelationDef,
};
use serde::{self, Deserialize, Serialize};

pub struct GroupingSize {
pub size: u64,
Expand Down
9 changes: 4 additions & 5 deletions digital_asset_types/src/dapi/common/asset.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::dao::sea_orm_active_enums::{SpecificationAssetClass, SpecificationVersions};
use crate::dao::sea_orm_active_enums::SpecificationVersions;
use crate::dao::Pagination;
use crate::dao::{asset, asset_authority, asset_creators, asset_data, asset_grouping};
use crate::dao::{FullAsset, FullAssetList};
use crate::dao::FullAsset;

use crate::rpc::filter::{AssetSortBy, AssetSortDirection, AssetSorting};
use crate::rpc::response::{AssetError, AssetList};
Expand All @@ -12,10 +12,9 @@ use crate::rpc::{

use jsonpath_lib::JsonPathError;
use mime_guess::Mime;
use sea_orm::DatabaseConnection;
use sea_orm::{entity::*, query::*, DbErr};
use sea_orm::DbErr;
use serde_json::Value;
use std::collections::{BTreeMap, HashMap};
use std::collections::HashMap;
use std::path::Path;
use url::Url;

Expand Down
8 changes: 3 additions & 5 deletions nft_ingester/src/account_updates.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
use std::{
collections::{HashMap, HashSet},
sync::Arc,
};

use crate::{
config::rand_string, error::IngesterError, metric, metrics::capture_result,
metric, metrics::capture_result,
program_transformers::ProgramTransformer, tasks::TaskData,
};
use cadence_macros::{is_global_default_set, statsd_count, statsd_gauge, statsd_time};
use cadence_macros::{is_global_default_set, statsd_count, statsd_time};
use chrono::Utc;
use futures::{stream::FuturesUnordered, StreamExt};
use log::{debug, error, info};
use log::{debug, error};
use plerkle_messenger::{ConsumptionType, Messenger, MessengerConfig, RecvData, ACCOUNT_STREAM};
use plerkle_serialization::root_as_account_info;
use sqlx::{Pool, Postgres};
Expand Down
4 changes: 2 additions & 2 deletions nft_ingester/src/backfiller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use solana_transaction_status::{
use spl_account_compression::state::{
merkle_tree_get_size, ConcurrentMerkleTreeHeader, CONCURRENT_MERKLE_TREE_HEADER_SIZE_V1,
};
use sqlx::{self, postgres::PgListener, Pool, Postgres};
use sqlx::{self, Pool, Postgres};
use std::{
cmp,
collections::{HashMap, HashSet},
Expand Down Expand Up @@ -206,7 +206,7 @@ impl<'a, T: Messenger> Backfiller<'a, T> {
let db = SqlxPostgresConnector::from_sqlx_postgres_pool(pool.clone());

// Get database listener channel.
let channel = config
let _channel = config
.database_config
.get(DATABASE_LISTENER_CHANNEL_KEY)
.and_then(|u| u.clone().into_string())
Expand Down
1 change: 0 additions & 1 deletion nft_ingester/src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use sqlx::{postgres::{PgPoolOptions, PgConnectOptions}, PgPool, ConnectOptions};

use crate::{
config::{IngesterConfig, IngesterRole},
error,
};
const BARE_MINIMUM_CONNECTIONS: u32 = 5;
const DEFAULT_MAX: u32 = 125;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use super::{save_changelog_event, update_asset};
use crate::error::IngesterError;
use blockbuster::{instruction::InstructionBundle, programs::bubblegum::BubblegumInstruction};
use digital_asset_types::dao::asset;
use sea_orm::{
entity::*, query::*, ColumnTrait, ConnectionTrait, DatabaseTransaction, DbBackend, EntityTrait,
entity::*, query::*, ColumnTrait, ConnectionTrait, DbBackend, EntityTrait,
};

pub async fn decompress<'c, T>(
Expand Down
4 changes: 2 additions & 2 deletions nft_ingester/src/program_transformers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ use blockbuster::{
token_metadata::TokenMetadataParser, ProgramParseResult,
},
};
use log::{debug, error, info};
use log::{debug, info};
use plerkle_serialization::{AccountInfo, Pubkey as FBPubkey, TransactionInfo};
use sea_orm::{DatabaseConnection, SqlxPostgresConnector, TransactionTrait};
use sea_orm::{DatabaseConnection, SqlxPostgresConnector};
use solana_sdk::pubkey::Pubkey;
use sqlx::PgPool;
use std::collections::{HashMap, HashSet, VecDeque};
Expand Down
2 changes: 1 addition & 1 deletion nft_ingester/src/program_transformers/token/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use sea_orm::{
DatabaseConnection, DbBackend, EntityTrait,
};
use solana_sdk::program_option::COption;
use spl_token::state::{AccountState, Mint, Account};
use spl_token::state::{AccountState};
use tokio::sync::mpsc::UnboundedSender;

pub async fn handle_token_program_account<'a, 'b, 'c>(
Expand Down
9 changes: 4 additions & 5 deletions nft_ingester/src/transaction_notifications.rs
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
use std::sync::Arc;

use crate::{
config::rand_string, error::IngesterError, metric, metrics::capture_result,
metric, metrics::capture_result,
program_transformers::ProgramTransformer, tasks::TaskData,
};
use cadence_macros::{is_global_default_set, statsd_count, statsd_gauge, statsd_time};
use cadence_macros::{is_global_default_set, statsd_count, statsd_time};
use chrono::Utc;
use futures::{stream::FuturesUnordered, StreamExt};
use log::{debug, error, info};
use log::{debug, error};
use plerkle_messenger::{
ConsumptionType, Messenger, MessengerConfig, RecvData, TRANSACTION_STREAM,
};
use plerkle_serialization::root_as_transaction_info;

use sqlx::{Pool, Postgres};
use tokio::{
sync::{mpsc::UnboundedSender, Semaphore},
sync::mpsc::UnboundedSender,
task::{JoinHandle, JoinSet},
time::Instant,
};
Expand Down

0 comments on commit 61acd9e

Please sign in to comment.