fmt
This commit is contained in:
parent
1b178777e8
commit
276f3262dd
|
@ -64,7 +64,9 @@ pub async fn process_blocks(
|
|||
};
|
||||
// add CU in counter
|
||||
if let Some(meta) = &meta {
|
||||
if let solana_transaction_status::option_serializer::OptionSerializer::Some(x) = meta.compute_units_consumed {
|
||||
if let solana_transaction_status::option_serializer::OptionSerializer::Some(x) =
|
||||
meta.compute_units_consumed
|
||||
{
|
||||
cu_consumed = cu_consumed.saturating_add(x);
|
||||
}
|
||||
}
|
||||
|
@ -204,7 +206,7 @@ pub fn confirmation_by_lite_rpc_notification_stream(
|
|||
if tx_notification.commitment != CommitmentLevel::Finalized {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if let Some(value) = transaction_map.get(&tx_notification.signature) {
|
||||
let (tx_sent_record, _) = value.clone();
|
||||
let error = match &tx_notification.transaction_status {
|
||||
|
|
|
@ -206,9 +206,7 @@ pub async fn main() -> anyhow::Result<()> {
|
|||
account_keys_parsed.len(),
|
||||
number_of_markers_per_mm,
|
||||
quotes_per_second,
|
||||
account_keys_parsed.len()
|
||||
* number_of_markers_per_mm as usize
|
||||
* *quotes_per_second as usize,
|
||||
account_keys_parsed.len() * number_of_markers_per_mm as usize * *quotes_per_second as usize,
|
||||
duration
|
||||
);
|
||||
|
||||
|
|
|
@ -30,9 +30,9 @@ pub fn initialize_result_writers(
|
|||
File::create(block_data_save_file).await.unwrap(),
|
||||
);
|
||||
let mut block_data = block_data;
|
||||
while let Ok(record) = block_data.recv().await {
|
||||
writer.serialize(record).await.unwrap();
|
||||
}
|
||||
while let Ok(record) = block_data.recv().await {
|
||||
writer.serialize(record).await.unwrap();
|
||||
}
|
||||
writer.flush().await.unwrap();
|
||||
});
|
||||
tasks.push(block_data_jh);
|
||||
|
|
|
@ -3,7 +3,7 @@ use fixed::types::I80F48;
|
|||
use mango::state::PerpMarket;
|
||||
use serde::Serialize;
|
||||
use solana_program::{pubkey::Pubkey, slot_history::Slot};
|
||||
use solana_sdk::{signature::Signature, commitment_config::CommitmentLevel};
|
||||
use solana_sdk::{commitment_config::CommitmentLevel, signature::Signature};
|
||||
use std::fmt;
|
||||
|
||||
#[derive(Clone, Debug, Serialize)]
|
||||
|
|
|
@ -47,15 +47,15 @@ impl TpuManager {
|
|||
}
|
||||
let transaction = bincode::serialize(transaction).unwrap();
|
||||
|
||||
let res = self.transaction_service
|
||||
let res = self
|
||||
.transaction_service
|
||||
.send_transaction(transaction, None)
|
||||
.await;
|
||||
|
||||
if let Err(e) = &res{
|
||||
if let Err(e) = &res {
|
||||
print!("error sending txs on custom tpu {e:?}");
|
||||
}
|
||||
res.is_ok()
|
||||
|
||||
}
|
||||
|
||||
pub async fn send_transaction_batch(
|
||||
|
|
Loading…
Reference in New Issue