@@ -5,7 +5,7 @@ use super::{
55} ;
66use crate :: actors:: syncer;
77use alto_types:: Block ;
8- use commonware_cryptography:: { sha256 :: Digest , Hasher , Sha256 } ;
8+ use commonware_cryptography:: { Digestible , Hasher , Sha256 } ;
99use commonware_macros:: select;
1010use commonware_runtime:: { Clock , Handle , Metrics , Spawner } ;
1111use commonware_utils:: SystemTimeExt ;
@@ -54,7 +54,6 @@ const SYNCHRONY_BOUND: u64 = 500;
5454/// Application actor.
5555pub struct Actor < R : Rng + Spawner + Metrics + Clock > {
5656 context : R ,
57- prover : Prover < Digest > ,
5857 hasher : Sha256 ,
5958 mailbox : mpsc:: Receiver < Message > ,
6059}
@@ -66,7 +65,6 @@ impl<R: Rng + Spawner + Metrics + Clock> Actor<R> {
6665 (
6766 Self {
6867 context,
69- prover : config. prover ,
7068 hasher : Sha256 :: new ( ) ,
7169 mailbox,
7270 } ,
@@ -212,26 +210,6 @@ impl<R: Rng + Spawner + Metrics + Clock> Actor<R> {
212210 }
213211 } ) ;
214212 }
215- Message :: Prepared { proof, payload } => {
216- // Parse the proof
217- let ( view, parent, _, signature, seed) =
218- self . prover . deserialize_notarization ( proof) . unwrap ( ) ;
219- let notarization = Notarization :: new ( view, parent, payload, signature. into ( ) ) ;
220- let seed = Seed :: new ( view, seed. into ( ) ) ;
221-
222- // Send the notarization to the syncer
223- syncer. notarized ( notarization, seed) . await ;
224- }
225- Message :: Finalized { proof, payload } => {
226- // Parse the proof
227- let ( view, parent, _, signature, seed) =
228- self . prover . deserialize_finalization ( proof. clone ( ) ) . unwrap ( ) ;
229- let finalization = Finalization :: new ( view, parent, payload, signature. into ( ) ) ;
230- let seed = Seed :: new ( view, seed. into ( ) ) ;
231-
232- // Send the finalization to the syncer
233- syncer. finalized ( finalization, seed) . await ;
234- }
235213 }
236214 }
237215 }
0 commit comments