|
4 | 4 | //! `Application` trait, suitable for testing the `Marshaled` wrapper in |
5 | 5 | //! both standard and coding variants. |
6 | 6 |
|
7 | | -use crate::{CertifiableBlock, Epochable}; |
| 7 | +use crate::{marshal::ancestry::Ancestry, CertifiableBlock, Epochable}; |
8 | 8 | use commonware_runtime::deterministic; |
9 | 9 | use commonware_utils::{ |
10 | 10 | channel::{fallible::OneshotExt, oneshot}, |
11 | 11 | sync::Mutex, |
12 | 12 | }; |
13 | | -use futures::Stream; |
14 | 13 | use std::{marker::PhantomData, sync::Arc}; |
15 | 14 |
|
16 | 15 | /// A mock application that implements `Application` for testing. |
@@ -75,15 +74,15 @@ where |
75 | 74 | async fn propose( |
76 | 75 | &mut self, |
77 | 76 | _context: (deterministic::Context, Self::Context), |
78 | | - _ancestry: impl Stream<Item = Self::Block> + Send + Unpin + 'static, |
| 77 | + _ancestry: impl Ancestry<Self::Block>, |
79 | 78 | ) -> Option<Self::Block> { |
80 | 79 | self.propose_result.clone() |
81 | 80 | } |
82 | 81 |
|
83 | 82 | async fn verify( |
84 | 83 | &mut self, |
85 | 84 | _context: (deterministic::Context, Self::Context), |
86 | | - _ancestry: impl Stream<Item = Self::Block> + Send + Unpin + 'static, |
| 85 | + _ancestry: impl Ancestry<Self::Block>, |
87 | 86 | ) -> bool { |
88 | 87 | self.verify_result |
89 | 88 | } |
@@ -136,15 +135,15 @@ where |
136 | 135 | async fn propose( |
137 | 136 | &mut self, |
138 | 137 | _context: (deterministic::Context, Self::Context), |
139 | | - _ancestry: impl Stream<Item = Self::Block> + Send + Unpin + 'static, |
| 138 | + _ancestry: impl Ancestry<Self::Block>, |
140 | 139 | ) -> Option<Self::Block> { |
141 | 140 | None |
142 | 141 | } |
143 | 142 |
|
144 | 143 | async fn verify( |
145 | 144 | &mut self, |
146 | 145 | _context: (deterministic::Context, Self::Context), |
147 | | - _ancestry: impl Stream<Item = Self::Block> + Send + Unpin + 'static, |
| 146 | + _ancestry: impl Ancestry<Self::Block>, |
148 | 147 | ) -> bool { |
149 | 148 | if let Some(started) = self.started.lock().take() { |
150 | 149 | started.send_lossy(()); |
|
0 commit comments