remove warnings

This commit is contained in:
Maximilian Schneider 2023-02-18 20:41:40 +09:00
parent ffe776b70d
commit 8ee6c6ac10
6 changed files with 9 additions and 35 deletions

View File

@ -6,7 +6,6 @@ use crate::{
use anchor_lang::prelude::Pubkey;
use async_trait::async_trait;
use log::*;
use solana_sdk::{account::WritableAccount, stake_history::Epoch};
use std::{
collections::{BTreeSet, HashMap},
@ -119,7 +118,7 @@ pub fn init(
},
);
}
Err(skip_reason) => {
Err(_skip_reason) => {
// todo: metrics
}
}

View File

@ -35,7 +35,7 @@ pub async fn init(client: Arc<RpcClient>) -> Arc<RwLock<Hash>> {
));
// launch task
let join_hdl = {
let _join_hdl = {
// create a thread-local reference to blockhash
let blockhash_c = blockhash.clone();
spawn(async move { poll_loop(blockhash_c, client).await })

View File

@ -17,7 +17,6 @@ use solana_sdk::{
};
use bytemuck::cast_ref;
use mango_v4::state::FillEvent;
use anchor_lang::AccountDeserialize;

View File

@ -1,35 +1,15 @@
use bytemuck::cast_ref;
use mango_v4::state::FillEvent;
use serum_dex::{instruction::MarketInstruction, state::EventView};
use solana_geyser_connector_lib::{
account_write_filter::{self, AccountWriteRoute},
chain_data::{AccountData, ChainData, SlotData},
metrics::Metrics,
serum::SerumEventQueueHeader,
AccountWrite, SlotUpdate,
};
use anchor_lang::AccountDeserialize;
use log::*;
use solana_sdk::{
account::{ReadableAccount, WritableAccount},
instruction::{AccountMeta, Instruction},
pubkey::Pubkey,
stake_history::Epoch,
};
use std::{
borrow::BorrowMut,
collections::{BTreeSet, HashMap, HashSet},
convert::TryFrom,
str::FromStr,
sync::Arc,
time::{Duration, Instant},
};
use solana_sdk::{instruction::Instruction, pubkey::Pubkey};
use std::{sync::Arc, time::Duration};
use crate::{openbook_crank_sink::OpenbookCrankSink, mango_v4_perp_crank_sink::MangoV4PerpCrankSink};
const MAX_BACKLOG: usize = 2;
const TIMEOUT_INTERVAL: Duration = Duration::from_millis(400);
use crate::{
mango_v4_perp_crank_sink::MangoV4PerpCrankSink, openbook_crank_sink::OpenbookCrankSink,
};
pub fn init(
perp_queue_pks: Vec<(Pubkey, Pubkey)>,

View File

@ -28,8 +28,7 @@ pub async fn send_loop(
*blockhash.read().unwrap(),
);
// TODO: collect metrics
info!("send tx={:?}", tx.signatures[0]);
client.send_transaction_with_config(&tx, cfg).await;
info!("send tx={:?} ok={:?}", tx.signatures[0], client.send_transaction_with_config(&tx, cfg).await);
}
}
}

View File

@ -370,10 +370,7 @@ async fn main() -> anyhow::Result<()> {
.map(|(_, context)| (context.address, context.market.event_queue))
.collect();
let spot_queue_pks: Vec<(Pubkey, Pubkey)> = spot_market_configs
.iter()
.map(|x| (x.0, x.1.event_queue))
.collect();
let a: Vec<(String, String)> = group_context
.serum3_markets
.iter()