Skip to content

Commit

Permalink
impl Deref for RuntimeTransaction (anza-xyz#2675)
Browse files Browse the repository at this point in the history
  • Loading branch information
apfitzge authored and ray-kast committed Nov 27, 2024
1 parent 1b2bac3 commit f971558
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion runtime-transaction/src/runtime_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use {
compute_budget_instruction_details::*,
transaction_meta::{DynamicMeta, StaticMeta, TransactionMeta},
},
core::ops::Deref,
solana_compute_budget::compute_budget_limits::ComputeBudgetLimits,
solana_sdk::{
feature_set::FeatureSet,
Expand Down Expand Up @@ -62,7 +63,15 @@ impl<T: StaticMetaAccess> StaticMeta for RuntimeTransaction<T> {
}
}

impl<M: DynamicMetaAccess> DynamicMeta for RuntimeTransaction<M> {}
impl<T: DynamicMetaAccess> DynamicMeta for RuntimeTransaction<T> {}

impl<T> Deref for RuntimeTransaction<T> {
type Target = T;

fn deref(&self) -> &Self::Target {
&self.transaction
}
}

impl RuntimeTransaction<SanitizedVersionedTransaction> {
pub fn try_from(
Expand Down

0 comments on commit f971558

Please sign in to comment.