Skip to content

Commit c30f999

Browse files
committed
(misc) fmt
1 parent 21fcbf2 commit c30f999

5 files changed

+28
-18
lines changed

src/geyser_plugin_postgres.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ use {
55
postgres_client::{ParallelPostgresClient, PostgresClientBuilder},
66
transaction_selector::TransactionSelector,
77
},
8-
bs58,
9-
log::*,
10-
serde_derive::{Deserialize, Serialize},
11-
serde_json,
128
agave_geyser_plugin_interface::geyser_plugin_interface::{
139
GeyserPlugin, GeyserPluginError, ReplicaAccountInfoVersions, ReplicaBlockInfoVersions,
1410
ReplicaTransactionInfoVersions, Result, SlotStatus,
1511
},
12+
bs58,
13+
log::*,
14+
serde_derive::{Deserialize, Serialize},
15+
serde_json,
1616
solana_measure::measure::Measure,
1717
solana_metrics::*,
1818
std::{fs::File, io::Read},
@@ -311,7 +311,12 @@ impl GeyserPlugin for GeyserPluginPostgres {
311311
Ok(())
312312
}
313313

314-
fn update_slot_status(&self, slot: u64, parent: Option<u64>, status: &SlotStatus) -> Result<()> {
314+
fn update_slot_status(
315+
&self,
316+
slot: u64,
317+
parent: Option<u64>,
318+
status: &SlotStatus,
319+
) -> Result<()> {
315320
info!("Updating slot {:?} at with status {:?}", slot, status);
316321

317322
match &self.client {

src/postgres_client.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ use {
1010
geyser_plugin_postgres::{GeyserPluginPostgresConfig, GeyserPluginPostgresError},
1111
postgres_client::postgres_client_account_index::TokenSecondaryIndexEntry,
1212
},
13+
agave_geyser_plugin_interface::geyser_plugin_interface::{
14+
GeyserPluginError, ReplicaAccountInfoV3, ReplicaBlockInfoV4, SlotStatus,
15+
},
1316
chrono::Utc,
1417
crossbeam_channel::{bounded, Receiver, RecvTimeoutError, Sender},
1518
log::*,
@@ -18,9 +21,6 @@ use {
1821
postgres_client_block_metadata::DbBlockInfo,
1922
postgres_client_transaction::LogTransactionRequest,
2023
postgres_openssl::MakeTlsConnector,
21-
agave_geyser_plugin_interface::geyser_plugin_interface::{
22-
GeyserPluginError, ReplicaAccountInfoV3, ReplicaBlockInfoV4, SlotStatus,
23-
},
2424
solana_measure::measure::Measure,
2525
solana_metrics::*,
2626
solana_sdk::timing::AtomicInterval,

src/postgres_client/postgres_client_account_index.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ use {
88
inline_spl_token::{self, GenericTokenAccount},
99
inline_spl_token_2022,
1010
},
11+
agave_geyser_plugin_interface::geyser_plugin_interface::GeyserPluginError,
1112
log::*,
1213
postgres::{Client, Statement},
13-
agave_geyser_plugin_interface::geyser_plugin_interface::GeyserPluginError,
1414
solana_measure::measure::Measure,
1515
solana_metrics::*,
1616
solana_sdk::pubkey::Pubkey,

src/postgres_client/postgres_client_block_metadata.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ use {
55
postgres_client_transaction::DbReward, SimplePostgresClient, UpdateBlockMetadataRequest,
66
},
77
},
8-
chrono::Utc,
9-
log::*,
10-
postgres::{Client, Statement},
118
agave_geyser_plugin_interface::geyser_plugin_interface::{
129
GeyserPluginError, ReplicaBlockInfoV4,
1310
},
11+
chrono::Utc,
12+
log::*,
13+
postgres::{Client, Statement},
1414
};
1515

1616
#[derive(Clone, Debug)]
@@ -27,7 +27,12 @@ impl<'a> From<&ReplicaBlockInfoV4<'a>> for DbBlockInfo {
2727
Self {
2828
slot: block_info.slot as i64,
2929
blockhash: block_info.blockhash.to_string(),
30-
rewards: block_info.rewards.rewards.iter().map(DbReward::from).collect(),
30+
rewards: block_info
31+
.rewards
32+
.rewards
33+
.iter()
34+
.map(DbReward::from)
35+
.collect(),
3136
block_time: block_info.block_time,
3237
block_height: block_info
3338
.block_height

src/postgres_client/postgres_client_transaction.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ use {
55
geyser_plugin_postgres::{GeyserPluginPostgresConfig, GeyserPluginPostgresError},
66
postgres_client::{DbWorkItem, ParallelPostgresClient, SimplePostgresClient},
77
},
8+
agave_geyser_plugin_interface::geyser_plugin_interface::{
9+
GeyserPluginError, ReplicaTransactionInfoV2,
10+
},
811
chrono::Utc,
912
log::*,
1013
postgres::{Client, Statement},
1114
postgres_types::{FromSql, ToSql},
12-
agave_geyser_plugin_interface::geyser_plugin_interface::{
13-
GeyserPluginError, ReplicaTransactionInfoV2,
14-
},
1515
solana_runtime::bank::RewardType,
1616
solana_sdk::{
1717
instruction::CompiledInstruction,
@@ -353,7 +353,7 @@ pub enum DbTransactionErrorCode {
353353
ResanitizationNeeded,
354354
UnbalancedTransaction,
355355
ProgramExecutionTemporarilyRestricted,
356-
ProgramCacheHitMaxLimit
356+
ProgramCacheHitMaxLimit,
357357
}
358358

359359
impl From<&TransactionError> for DbTransactionErrorCode {
@@ -414,7 +414,7 @@ impl From<&TransactionError> for DbTransactionErrorCode {
414414
TransactionError::ProgramExecutionTemporarilyRestricted { account_index: _ } => {
415415
Self::ProgramExecutionTemporarilyRestricted
416416
}
417-
TransactionError::ProgramCacheHitMaxLimit => Self::ProgramCacheHitMaxLimit
417+
TransactionError::ProgramCacheHitMaxLimit => Self::ProgramCacheHitMaxLimit,
418418
}
419419
}
420420
}

0 commit comments

Comments
 (0)