Skip to content

Commit

Permalink
remove extra features from SVMTransaction
Browse files Browse the repository at this point in the history
  • Loading branch information
apfitzge committed Jul 11, 2024
1 parent 6319c6a commit d131fea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 33 deletions.
17 changes: 1 addition & 16 deletions svm-transaction/src/svm_transaction.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use {
crate::svm_message::SVMMessage,
solana_sdk::{hash::Hash, signature::Signature, transaction::VersionedTransaction},
};
use {crate::svm_message::SVMMessage, solana_sdk::signature::Signature};

mod sanitized_transaction;

Expand All @@ -11,16 +8,4 @@ pub trait SVMTransaction: SVMMessage {

/// Get all the signatures of the message.
fn signatures(&self) -> &[Signature];

/// Returns the message hash.
// TODO: consider moving this to Message
fn message_hash(&self) -> &Hash;

/// Returns true if the transaction is a simple vote transaction.
// TODO: consider moving this to Message
fn is_simple_vote_transaction(&self) -> bool;

/// Make a versioned transaction copy of the transaction.
// TODO: get rid of this once PoH supports generic transactions
fn to_versioned_transaction(&self) -> VersionedTransaction;
}
18 changes: 1 addition & 17 deletions svm-transaction/src/svm_transaction/sanitized_transaction.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
use {
crate::svm_transaction::SVMTransaction,
solana_sdk::{
hash::Hash,
signature::Signature,
transaction::{SanitizedTransaction, VersionedTransaction},
},
solana_sdk::{signature::Signature, transaction::SanitizedTransaction},
};

impl SVMTransaction for SanitizedTransaction {
Expand All @@ -15,16 +11,4 @@ impl SVMTransaction for SanitizedTransaction {
fn signatures(&self) -> &[Signature] {
SanitizedTransaction::signatures(self)
}

fn message_hash(&self) -> &Hash {
SanitizedTransaction::message_hash(self)
}

fn is_simple_vote_transaction(&self) -> bool {
SanitizedTransaction::is_simple_vote_transaction(self)
}

fn to_versioned_transaction(&self) -> VersionedTransaction {
SanitizedTransaction::to_versioned_transaction(self)
}
}

0 comments on commit d131fea

Please sign in to comment.