Skip to content

Commit

Permalink
Use new variant to return entry count
Browse files Browse the repository at this point in the history
  • Loading branch information
CriesofCarrots committed Sep 21, 2023
1 parent e0603fe commit 6fc2a3f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions core/src/replay_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2927,6 +2927,7 @@ impl ReplayStage {
Some(bank.clock().unix_timestamp),
Some(bank.block_height()),
bank.executed_transaction_count(),
r_replay_progress.num_entries as u64,
)
}
bank_complete_time.stop();
Expand Down
12 changes: 8 additions & 4 deletions geyser-plugin-manager/src/block_metadata_notifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use {
log::*,
solana_accounts_db::stake_rewards::RewardInfo,
solana_geyser_plugin_interface::geyser_plugin_interface::{
ReplicaBlockInfoV2, ReplicaBlockInfoVersions,
ReplicaBlockInfoV3, ReplicaBlockInfoVersions,
},
solana_measure::measure::Measure,
solana_metrics::*,
Expand All @@ -31,6 +31,7 @@ impl BlockMetadataNotifier for BlockMetadataNotifierImpl {
block_time: Option<UnixTimestamp>,
block_height: Option<u64>,
executed_transaction_count: u64,
entry_count: u64,
) {
let plugin_manager = self.plugin_manager.read().unwrap();
if plugin_manager.plugins.is_empty() {
Expand All @@ -49,8 +50,9 @@ impl BlockMetadataNotifier for BlockMetadataNotifierImpl {
block_time,
block_height,
executed_transaction_count,
entry_count,
);
let block_info = ReplicaBlockInfoVersions::V0_0_2(&block_info);
let block_info = ReplicaBlockInfoVersions::V0_0_3(&block_info);
match plugin.notify_block_metadata(block_info) {
Err(err) => {
error!(
Expand Down Expand Up @@ -103,8 +105,9 @@ impl BlockMetadataNotifierImpl {
block_time: Option<UnixTimestamp>,
block_height: Option<u64>,
executed_transaction_count: u64,
) -> ReplicaBlockInfoV2<'a> {
ReplicaBlockInfoV2 {
entry_count: u64,
) -> ReplicaBlockInfoV3<'a> {
ReplicaBlockInfoV3 {
parent_slot,
parent_blockhash,
slot,
Expand All @@ -113,6 +116,7 @@ impl BlockMetadataNotifierImpl {
block_time,
block_height,
executed_transaction_count,
entry_count,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pub trait BlockMetadataNotifier {
block_time: Option<UnixTimestamp>,
block_height: Option<u64>,
executed_transaction_count: u64,
entry_count: u64,
);
}

Expand Down

0 comments on commit 6fc2a3f

Please sign in to comment.