From 123c6946f2d5ab63e3935b1df37cec182d0da5ac Mon Sep 17 00:00:00 2001 From: Sosthene Date: Tue, 17 Dec 2024 22:36:33 +0100 Subject: [PATCH] Remove impending_requests from Process --- src/process.rs | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/process.rs b/src/process.rs index edd89ad..0af2445 100644 --- a/src/process.rs +++ b/src/process.rs @@ -234,13 +234,11 @@ impl ProcessState { } /// A process is basically a succession of states -/// If a process has nothing to do with us, impending_requests will be empty /// The latest state MUST be an empty state with only the commited_in field set at the last unspent outpoint #[derive(Debug, Default, Clone, PartialEq, Serialize, Deserialize, Tsify)] #[tsify(into_wasm_abi)] pub struct Process { states: Vec, - impending_requests: Vec, } impl Process { @@ -253,7 +251,6 @@ impl Process { }; Self { states: vec![empty_state], - impending_requests: vec![], } } @@ -464,24 +461,6 @@ impl Process { .find(|s| s.commited_in != latest_outpoint); } - pub fn insert_impending_request(&mut self, request: Prd) { - self.impending_requests.push(request); - } - - pub fn get_impending_requests(&self) -> Vec<&Prd> { - self.impending_requests.iter().collect() - } - - pub fn get_impending_requests_mut(&mut self) -> Vec<&mut Prd> { - self.impending_requests.iter_mut().collect() - } - - pub fn prune_impending_requests(&mut self) { - self.impending_requests = self.impending_requests.clone().into_iter() - .filter(|r| r.prd_type != PrdType::None) - .collect(); - } - pub fn get_state_index(&self, state: &ProcessState) -> Option { // Get the commited_in value of the provided state let target_commited_in = state.commited_in;