mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Apply DKG TX handling code to all sign TXs
The existing code was almost entirely applicable. It just needed to be scoped with an ID. While the handle function is now a bit convoluted, I don't see a better option.
This commit is contained in:
@@ -327,6 +327,13 @@ impl TransactionTrait for Transaction {
|
||||
|
||||
fn verify(&self) -> Result<(), TransactionError> {
|
||||
// TODO: Augment with checks that the Vecs can be deser'd and are for recognized IDs
|
||||
|
||||
if let Transaction::BatchShare(data) = self {
|
||||
if data.data.len() != 32 {
|
||||
Err(TransactionError::InvalidContent)?;
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user