From fcc2b9647f06eff80f748d59dfaab06ea2fa9980 Mon Sep 17 00:00:00 2001 From: Tal Derei Date: Mon, 16 Sep 2024 11:16:32 -0700 Subject: [PATCH] getters for action list struct --- crates/core/transaction/src/action_list.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/crates/core/transaction/src/action_list.rs b/crates/core/transaction/src/action_list.rs index d1d0b1c2fc..9d20c8f042 100644 --- a/crates/core/transaction/src/action_list.rs +++ b/crates/core/transaction/src/action_list.rs @@ -1,4 +1,5 @@ use anyhow::Result; +use penumbra_proto::core::transaction::v1::Action; use std::collections::BTreeMap; use crate::plan::MemoPlan; @@ -29,6 +30,21 @@ pub struct ActionList { } impl ActionList { + /// Returns an immutable reference to a list of action plans. + pub fn actions(&self) -> &Vec { + &self.actions + } + + /// Returns an immutable reference to a map of change outputs. + pub fn change_outputs(&self) -> &BTreeMap { + &self.change_outputs + } + + /// Returns an immutable reference to the fee. + pub fn fee(&self) -> &Fee { + &self.fee + } + /// Returns true if the resulting transaction would require a memo. pub fn requires_memo(&self) -> bool { let has_change_outputs = !self.change_outputs.is_empty();