diff --git a/src/process.rs b/src/process.rs index b3fcec2..5498ddd 100644 --- a/src/process.rs +++ b/src/process.rs @@ -250,6 +250,10 @@ impl Process { } } + pub fn get_process_id(&self) -> anyhow::Result { + Ok(self.states.get(0).ok_or(anyhow::Error::msg("Empty state list"))?.commited_in) + } + pub fn get_last_unspent_outpoint(&self) -> anyhow::Result { if self.states.is_empty() { return Err(anyhow::Error::msg("Empty Process")); } let last_state = self.states.last().unwrap();