Skip to content

Commit

Permalink
Build ReplicaTransactionInfoV2 using signature from transaction param…
Browse files Browse the repository at this point in the history
…eter
  • Loading branch information
andreisilviudragnea committed Jun 1, 2024
1 parent 8de089a commit ae71ffa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
12 changes: 3 additions & 9 deletions geyser-plugin-manager/src/transaction_notifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,12 @@ impl TransactionNotifier for TransactionNotifierImpl {
&self,
slot: Slot,
index: usize,
signature: &Signature,
transaction_status_meta: &TransactionStatusMeta,
transaction: &SanitizedTransaction,
) {
let mut measure = Measure::start("geyser-plugin-notify_plugins_of_transaction_info");
let transaction_log_info = Self::build_replica_transaction_info(
index,
signature,
transaction_status_meta,
transaction,
);
let transaction_log_info =
Self::build_replica_transaction_info(index, transaction_status_meta, transaction);

let plugin_manager = self.plugin_manager.read().unwrap();

Expand Down Expand Up @@ -84,13 +79,12 @@ impl TransactionNotifierImpl {

fn build_replica_transaction_info<'a>(
index: usize,
signature: &'a Signature,
transaction_status_meta: &'a TransactionStatusMeta,
transaction: &'a SanitizedTransaction,
) -> ReplicaTransactionInfoV2<'a> {
ReplicaTransactionInfoV2 {
index,
signature,
signature: transaction.signature(),
is_vote: transaction.is_simple_vote_transaction(),
transaction,
transaction_status_meta,
Expand Down
1 change: 0 additions & 1 deletion rpc/src/transaction_notifier_interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ pub trait TransactionNotifier {
&self,
slot: Slot,
transaction_slot_index: usize,
signature: &Signature,
transaction_status_meta: &TransactionStatusMeta,
transaction: &SanitizedTransaction,
);
Expand Down
4 changes: 1 addition & 3 deletions rpc/src/transaction_status_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ impl TransactionStatusService {
transaction_notifier.notify_transaction(
slot,
transaction_index,
transaction.signature(),
&transaction_status_meta,
&transaction,
);
Expand Down Expand Up @@ -261,15 +260,14 @@ pub(crate) mod tests {
&self,
slot: Slot,
transaction_index: usize,
signature: &Signature,
transaction_status_meta: &TransactionStatusMeta,
transaction: &SanitizedTransaction,
) {
self.notifications.insert(
TestNotifierKey {
slot,
transaction_index,
signature: *signature,
signature: *transaction.signature(),
},
TestNotification {
_meta: transaction_status_meta.clone(),
Expand Down

0 comments on commit ae71ffa

Please sign in to comment.