remove warnings
This commit is contained in:
parent
ffe776b70d
commit
8ee6c6ac10
|
@ -6,7 +6,6 @@ use crate::{
|
||||||
|
|
||||||
use anchor_lang::prelude::Pubkey;
|
use anchor_lang::prelude::Pubkey;
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use log::*;
|
|
||||||
use solana_sdk::{account::WritableAccount, stake_history::Epoch};
|
use solana_sdk::{account::WritableAccount, stake_history::Epoch};
|
||||||
use std::{
|
use std::{
|
||||||
collections::{BTreeSet, HashMap},
|
collections::{BTreeSet, HashMap},
|
||||||
|
@ -119,7 +118,7 @@ pub fn init(
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Err(skip_reason) => {
|
Err(_skip_reason) => {
|
||||||
// todo: metrics
|
// todo: metrics
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ pub async fn init(client: Arc<RpcClient>) -> Arc<RwLock<Hash>> {
|
||||||
));
|
));
|
||||||
|
|
||||||
// launch task
|
// launch task
|
||||||
let join_hdl = {
|
let _join_hdl = {
|
||||||
// create a thread-local reference to blockhash
|
// create a thread-local reference to blockhash
|
||||||
let blockhash_c = blockhash.clone();
|
let blockhash_c = blockhash.clone();
|
||||||
spawn(async move { poll_loop(blockhash_c, client).await })
|
spawn(async move { poll_loop(blockhash_c, client).await })
|
||||||
|
|
|
@ -17,7 +17,6 @@ use solana_sdk::{
|
||||||
};
|
};
|
||||||
|
|
||||||
use bytemuck::cast_ref;
|
use bytemuck::cast_ref;
|
||||||
use mango_v4::state::FillEvent;
|
|
||||||
|
|
||||||
use anchor_lang::AccountDeserialize;
|
use anchor_lang::AccountDeserialize;
|
||||||
|
|
||||||
|
|
|
@ -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::{
|
use solana_geyser_connector_lib::{
|
||||||
account_write_filter::{self, AccountWriteRoute},
|
account_write_filter::{self, AccountWriteRoute},
|
||||||
chain_data::{AccountData, ChainData, SlotData},
|
|
||||||
metrics::Metrics,
|
metrics::Metrics,
|
||||||
serum::SerumEventQueueHeader,
|
|
||||||
AccountWrite, SlotUpdate,
|
AccountWrite, SlotUpdate,
|
||||||
};
|
};
|
||||||
|
|
||||||
use anchor_lang::AccountDeserialize;
|
use solana_sdk::{instruction::Instruction, pubkey::Pubkey};
|
||||||
use log::*;
|
use std::{sync::Arc, time::Duration};
|
||||||
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 crate::{openbook_crank_sink::OpenbookCrankSink, mango_v4_perp_crank_sink::MangoV4PerpCrankSink};
|
use crate::{
|
||||||
|
mango_v4_perp_crank_sink::MangoV4PerpCrankSink, openbook_crank_sink::OpenbookCrankSink,
|
||||||
const MAX_BACKLOG: usize = 2;
|
};
|
||||||
const TIMEOUT_INTERVAL: Duration = Duration::from_millis(400);
|
|
||||||
|
|
||||||
pub fn init(
|
pub fn init(
|
||||||
perp_queue_pks: Vec<(Pubkey, Pubkey)>,
|
perp_queue_pks: Vec<(Pubkey, Pubkey)>,
|
||||||
|
|
|
@ -28,8 +28,7 @@ pub async fn send_loop(
|
||||||
*blockhash.read().unwrap(),
|
*blockhash.read().unwrap(),
|
||||||
);
|
);
|
||||||
// TODO: collect metrics
|
// TODO: collect metrics
|
||||||
info!("send tx={:?}", tx.signatures[0]);
|
info!("send tx={:?} ok={:?}", tx.signatures[0], client.send_transaction_with_config(&tx, cfg).await);
|
||||||
client.send_transaction_with_config(&tx, cfg).await;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -370,10 +370,7 @@ async fn main() -> anyhow::Result<()> {
|
||||||
.map(|(_, context)| (context.address, context.market.event_queue))
|
.map(|(_, context)| (context.address, context.market.event_queue))
|
||||||
.collect();
|
.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
|
let a: Vec<(String, String)> = group_context
|
||||||
.serum3_markets
|
.serum3_markets
|
||||||
.iter()
|
.iter()
|
||||||
|
|
Loading…
Reference in New Issue