mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
Remove Session from VariantSignId::SlashReport
It's only there to make the VariantSignid unique across Sessions. By localizing the VariantSignid to a Session, we avoid this, and can better ensure we don't queue work for historic sessions.
This commit is contained in:
@@ -45,7 +45,7 @@ impl<D: Db, M: Clone + PreprocessMachine> AttemptManager<D, M> {
|
||||
|
||||
/// Register a signing protocol to attempt.
|
||||
///
|
||||
/// This ID must be unique across all sessions, attempt managers, protocols, etc.
|
||||
/// This ID must be unique to the session, across all attempt managers, protocols, etc.
|
||||
pub fn register(&mut self, id: VariantSignId, machines: Vec<M>) -> Vec<ProcessorMessage> {
|
||||
let mut protocol =
|
||||
SigningProtocol::new(self.db.clone(), self.session, self.start_i, id, machines);
|
||||
@@ -66,7 +66,7 @@ impl<D: Db, M: Clone + PreprocessMachine> AttemptManager<D, M> {
|
||||
} else {
|
||||
log::info!("retired signing protocol {id:?}");
|
||||
}
|
||||
SigningProtocol::<D, M>::cleanup(txn, id);
|
||||
SigningProtocol::<D, M>::cleanup(txn, self.session, id);
|
||||
}
|
||||
|
||||
/// Handle a message for a signing protocol.
|
||||
|
||||
Reference in New Issue
Block a user