22use {
33 crate :: geyser_plugin_manager:: GeyserPluginManager ,
44 agave_geyser_plugin_interface:: geyser_plugin_interface:: {
5- ReplicaDeshredTransactionInfo , ReplicaDeshredTransactionInfoVersions ,
5+ ReplicaDeshredTransactionInfoV2 , ReplicaDeshredTransactionInfoVersions ,
66 } ,
77 log:: * ,
88 solana_clock:: Slot ,
@@ -28,32 +28,36 @@ impl DeshredTransactionNotifier for DeshredTransactionNotifierImpl {
2828 fn notify_deshred_transaction (
2929 & self ,
3030 slot : Slot ,
31+ completed_data_set_starting_shred_index : u32 ,
32+ completed_data_set_ending_shred_index_exclusive : u32 ,
3133 signature : & Signature ,
3234 is_vote : bool ,
3335 transaction : & VersionedTransaction ,
3436 loaded_addresses : Option < & LoadedAddresses > ,
3537 ) {
38+ let plugin_manager = self . plugin_manager . read ( ) . unwrap ( ) ;
39+
40+ if plugin_manager. plugins . is_empty ( ) {
41+ return ;
42+ }
43+
3644 let mut measure =
3745 Measure :: start ( "geyser-plugin-notify_plugins_of_deshred_transaction_info" ) ;
38- let transaction_info = Self :: build_replica_deshred_transaction_info (
46+ let transaction_info = ReplicaDeshredTransactionInfoV2 {
3947 signature,
4048 is_vote,
4149 transaction,
4250 loaded_addresses,
43- ) ;
44-
45- let plugin_manager = self . plugin_manager . read ( ) . unwrap ( ) ;
46-
47- if plugin_manager. plugins . is_empty ( ) {
48- return ;
49- }
51+ completed_data_set_starting_shred_index,
52+ completed_data_set_ending_shred_index_exclusive,
53+ } ;
5054
5155 for plugin in plugin_manager. plugins . iter ( ) {
5256 if !plugin. deshred_transaction_notifications_enabled ( ) {
5357 continue ;
5458 }
5559 match plugin. notify_deshred_transaction (
56- ReplicaDeshredTransactionInfoVersions :: V0_0_1 ( & transaction_info) ,
60+ ReplicaDeshredTransactionInfoVersions :: V0_0_2 ( & transaction_info) ,
5761 slot,
5862 ) {
5963 Err ( err) => {
@@ -85,18 +89,4 @@ impl DeshredTransactionNotifierImpl {
8589 pub fn new ( plugin_manager : Arc < RwLock < GeyserPluginManager > > ) -> Self {
8690 Self { plugin_manager }
8791 }
88-
89- fn build_replica_deshred_transaction_info < ' a > (
90- signature : & ' a Signature ,
91- is_vote : bool ,
92- transaction : & ' a VersionedTransaction ,
93- loaded_addresses : Option < & ' a LoadedAddresses > ,
94- ) -> ReplicaDeshredTransactionInfo < ' a > {
95- ReplicaDeshredTransactionInfo {
96- signature,
97- is_vote,
98- transaction,
99- loaded_addresses,
100- }
101- }
10292}
0 commit comments