From 6543f82a2957fd9f6ec0f24c2c6a6531b1cd7814 Mon Sep 17 00:00:00 2001 From: Andrew Fitzgerald Date: Thu, 26 Sep 2024 07:29:34 -0500 Subject: [PATCH] impl Deref for RuntimeTransaction (#2675) --- runtime-transaction/src/runtime_transaction.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/runtime-transaction/src/runtime_transaction.rs b/runtime-transaction/src/runtime_transaction.rs index 966a24156d084f..aded0c9c819688 100644 --- a/runtime-transaction/src/runtime_transaction.rs +++ b/runtime-transaction/src/runtime_transaction.rs @@ -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, @@ -62,7 +63,15 @@ impl StaticMeta for RuntimeTransaction { } } -impl DynamicMeta for RuntimeTransaction {} +impl DynamicMeta for RuntimeTransaction {} + +impl Deref for RuntimeTransaction { + type Target = T; + + fn deref(&self) -> &Self::Target { + &self.transaction + } +} impl RuntimeTransaction { pub fn try_from(