55 } ,
66 log:: * ,
77 solana_geyser_plugin_interface:: geyser_plugin_interface:: {
8- ReplicaBlockInfo , ReplicaBlockInfoVersions ,
8+ ReplicaBlockInfoV2 , ReplicaBlockInfoVersions ,
99 } ,
1010 solana_measure:: measure:: Measure ,
1111 solana_metrics:: * ,
@@ -23,11 +23,14 @@ impl BlockMetadataNotifier for BlockMetadataNotifierImpl {
2323 /// Notify the block metadata
2424 fn notify_block_metadata (
2525 & self ,
26+ parent_slot : u64 ,
27+ parent_blockhash : & str ,
2628 slot : u64 ,
2729 blockhash : & str ,
2830 rewards : & RwLock < Vec < ( Pubkey , RewardInfo ) > > ,
2931 block_time : Option < UnixTimestamp > ,
3032 block_height : Option < u64 > ,
33+ executed_transaction_count : u64 ,
3134 ) {
3235 let mut plugin_manager = self . plugin_manager . write ( ) . unwrap ( ) ;
3336 if plugin_manager. plugins . is_empty ( ) {
@@ -37,9 +40,17 @@ impl BlockMetadataNotifier for BlockMetadataNotifierImpl {
3740
3841 for plugin in plugin_manager. plugins . iter_mut ( ) {
3942 let mut measure = Measure :: start ( "geyser-plugin-update-slot" ) ;
40- let block_info =
41- Self :: build_replica_block_info ( slot, blockhash, & rewards, block_time, block_height) ;
42- let block_info = ReplicaBlockInfoVersions :: V0_0_1 ( & block_info) ;
43+ let block_info = Self :: build_replica_block_info (
44+ parent_slot,
45+ parent_blockhash,
46+ slot,
47+ blockhash,
48+ & rewards,
49+ block_time,
50+ block_height,
51+ executed_transaction_count,
52+ ) ;
53+ let block_info = ReplicaBlockInfoVersions :: V0_0_2 ( & block_info) ;
4354 match plugin. notify_block_metadata ( block_info) {
4455 Err ( err) => {
4556 error ! (
@@ -84,18 +95,24 @@ impl BlockMetadataNotifierImpl {
8495 }
8596
8697 fn build_replica_block_info < ' a > (
98+ parent_slot : u64 ,
99+ parent_blockhash : & ' a str ,
87100 slot : u64 ,
88101 blockhash : & ' a str ,
89102 rewards : & ' a [ Reward ] ,
90103 block_time : Option < UnixTimestamp > ,
91104 block_height : Option < u64 > ,
92- ) -> ReplicaBlockInfo < ' a > {
93- ReplicaBlockInfo {
105+ executed_transaction_count : u64 ,
106+ ) -> ReplicaBlockInfoV2 < ' a > {
107+ ReplicaBlockInfoV2 {
108+ parent_slot,
109+ parent_blockhash,
94110 slot,
95111 blockhash,
96112 rewards,
97113 block_time,
98114 block_height,
115+ executed_transaction_count,
99116 }
100117 }
101118
0 commit comments