Skip to content

Commit

Permalink
block_time option
Browse files Browse the repository at this point in the history
  • Loading branch information
thesoftwarejedi committed Aug 4, 2023
1 parent 7c43af9 commit 727f88d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions crates/plugin/src/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn create_account_update(
is_startup,
txn_signature: None,
write_version: account.write_version,
block_time: 0,
block_time: None,
},
ReplicaAccountInfoVersions::V0_0_2(account) => AccountUpdate {
key: Pubkey::new_from_array(account.pubkey.try_into().unwrap()),
Expand All @@ -32,7 +32,7 @@ pub fn create_account_update(
is_startup,
txn_signature: account.txn_signature.map(std::string::ToString::to_string),
write_version: account.write_version,
block_time: 0,
block_time: None,
},
}
}
2 changes: 1 addition & 1 deletion crates/plugin/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ impl GeyserPlugin for GeyserPluginRabbitMq {
data,
accounts,
slot,
block_time: 0,
block_time: None,
}),
route,
)))
Expand Down
12 changes: 6 additions & 6 deletions crates/rabbitmq/src/geyser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub struct AccountUpdate {
pub slot: u64,
/// The block_time in which this account was updated
/// this is not known during processing, but is filled out by confirmooor when slots confirm
pub block_time: i64,
pub block_time: Option<i64>,
/// True if this update was triggered by a validator startup
pub is_startup: bool,
/// First signature of the transaction caused this account modification
Expand Down Expand Up @@ -104,7 +104,7 @@ pub struct UiAccountUpdate {
pub slot: u64,
/// The block_time in which this account was updated
/// this is not known during processing, but is filled out by confirmooor when slots confirm
pub block_time: i64,
pub block_time: Option<i64>,
/// True if this update was triggered by a validator startup
pub is_startup: bool,
/// First signature of the transaction caused this account modification
Expand All @@ -126,7 +126,7 @@ pub struct InstructionNotify {
pub slot: u64,
/// The block_time in which this account was updated
/// this is not known during processing, but is filled out by confirmooor when slots confirm
pub block_time: i64,
pub block_time: Option<i64>,
}

#[allow(clippy::from_over_into)]
Expand Down Expand Up @@ -173,7 +173,7 @@ pub struct UiInstructionNotify {
pub slot: u64,
/// the time of the block
/// this is not known during processing, but is filled out by confirmooor when slots confirm
pub block_time: i64,
pub block_time: Option<i64>,
}

/// Message data for an instruction notification
Expand Down Expand Up @@ -234,7 +234,7 @@ pub struct SlotStatistics {
pub slot: u64,
///the blocktime of the slot
/// this is not known for processing, but is later used in confirmooor
pub block_time: i64,
pub block_time: Option<i64>,

///count of successful txs
pub tx_success: u64,
Expand Down Expand Up @@ -280,7 +280,7 @@ impl SlotStatistics {
///clear the stats (set all 0)
pub fn clear(&mut self) {
self.slot = 0;
self.block_time = 0;
self.block_time = None;
self.tx_success = 0;
self.tx_success_fees = 0;
self.tx_success_fees_priority = 0;
Expand Down

0 comments on commit 727f88d

Please sign in to comment.