mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Remove invalid TODOs from processor signers
This commit is contained in:
@@ -428,10 +428,6 @@ impl<N: Network, D: Db> Signer<N, D> {
|
|||||||
Ok(machine) => machine,
|
Ok(machine) => machine,
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: Use a seeded RNG here so we don't produce distinct messages with the same intent
|
|
||||||
// This is also needed so we don't preprocess, send preprocess, reboot before ack'ing the
|
|
||||||
// message, send distinct preprocess, and then attempt a signing session premised on the
|
|
||||||
// former with the latter
|
|
||||||
let (machine, preprocess) = machine.preprocess(&mut OsRng);
|
let (machine, preprocess) = machine.preprocess(&mut OsRng);
|
||||||
machines.push(machine);
|
machines.push(machine);
|
||||||
serialized_preprocesses.push(preprocess.serialize());
|
serialized_preprocesses.push(preprocess.serialize());
|
||||||
|
|||||||
@@ -209,10 +209,6 @@ impl<D: Db> SubstrateSigner<D> {
|
|||||||
// b"substrate" is a literal from sp-core
|
// b"substrate" is a literal from sp-core
|
||||||
let machine = AlgorithmMachine::new(Schnorrkel::new(b"substrate"), keys.clone());
|
let machine = AlgorithmMachine::new(Schnorrkel::new(b"substrate"), keys.clone());
|
||||||
|
|
||||||
// TODO: Use a seeded RNG here so we don't produce distinct messages with the same intent
|
|
||||||
// This is also needed so we don't preprocess, send preprocess, reboot before ack'ing the
|
|
||||||
// message, send distinct preprocess, and then attempt a signing session premised on the
|
|
||||||
// former with the latter
|
|
||||||
let (machine, preprocess) = machine.preprocess(&mut OsRng);
|
let (machine, preprocess) = machine.preprocess(&mut OsRng);
|
||||||
machines.push(machine);
|
machines.push(machine);
|
||||||
serialized_preprocesses.push(preprocess.serialize());
|
serialized_preprocesses.push(preprocess.serialize());
|
||||||
@@ -389,10 +385,6 @@ impl<D: Db> SubstrateSigner<D> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn batch_signed(&mut self, txn: &mut D::Transaction<'_>, id: u32) {
|
pub fn batch_signed(&mut self, txn: &mut D::Transaction<'_>, id: u32) {
|
||||||
// Safe since SubstrateSigner won't be told of the completion until the Scanner recognizes the
|
|
||||||
// block behind it, which will trigger starting the Batch
|
|
||||||
// TODO: There is a race condition between the Scanner recognizing the block and the Batch
|
|
||||||
// having signing started
|
|
||||||
let sign_id = batch_sign_id(self.network, id);
|
let sign_id = batch_sign_id(self.network, id);
|
||||||
|
|
||||||
// Stop trying to sign for this batch
|
// Stop trying to sign for this batch
|
||||||
|
|||||||
Reference in New Issue
Block a user