mirror of
https://github.com/0xfnzero/solana-streamer.git
synced 2026-08-17 10:58:06 +00:00
fix warns
This commit is contained in:
@@ -349,7 +349,7 @@ impl EventProcessor {
|
||||
match source {
|
||||
EventSource::Grpc => {
|
||||
std::thread::spawn(move || {
|
||||
let mut worker_threads =
|
||||
let worker_threads =
|
||||
std::thread::available_parallelism().map(|n| n.get()).unwrap_or(4); // 如果获取失败则回退到4个线程
|
||||
|
||||
let rt = tokio::runtime::Builder::new_multi_thread()
|
||||
|
||||
@@ -6,7 +6,7 @@ use crate::streaming::{
|
||||
event_parser::{
|
||||
common::EventMetadata,
|
||||
protocols::pumpswap::{
|
||||
parser::PUMPSWAP_PROGRAM_ID, PumpSwapGlobalConfigAccountEvent, PumpSwapPoolAccountEvent,
|
||||
PumpSwapGlobalConfigAccountEvent, PumpSwapPoolAccountEvent,
|
||||
},
|
||||
UnifiedEvent,
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@ use solana_sdk::pubkey::Pubkey;
|
||||
|
||||
use crate::streaming::event_parser::{
|
||||
common::{read_u64_le, EventMetadata, EventType, ProtocolType},
|
||||
core::event_parser::{EventParser, GenericEventParseConfig},
|
||||
core::event_parser::GenericEventParseConfig,
|
||||
protocols::raydium_cpmm::{
|
||||
discriminators, RaydiumCpmmDepositEvent, RaydiumCpmmInitializeEvent, RaydiumCpmmSwapEvent,
|
||||
RaydiumCpmmWithdrawEvent,
|
||||
|
||||
@@ -23,6 +23,7 @@ pub struct PooledObject<T> {
|
||||
}
|
||||
|
||||
impl<T> PooledObject<T> {
|
||||
#[allow(dead_code)]
|
||||
fn new(object: Box<T>, pool: Arc<Mutex<VecDeque<Box<T>>>>, max_size: usize) -> Self {
|
||||
Self { object: Some(object), pool, max_size }
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ impl YellowstoneGrpc {
|
||||
.subscribe_with_account_request(account_filter, event_type_filter.as_ref());
|
||||
|
||||
// 订阅事件
|
||||
let (mut subscribe_tx, mut stream, subscribe_request) = self
|
||||
let (subscribe_tx, mut stream, subscribe_request) = self
|
||||
.subscription_manager
|
||||
.subscribe_with_request(transactions, accounts, commitment, event_type_filter.as_ref())
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user