mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
Implement serialization via parity's scale codec
Ideally, this would be generic. Unfortunately, the generic API serde doesn't natively support borsh, nor SCALE, and while there is a serde SCALE crate, it's old. While it may be complete, it's not worth working with. While we could still grab bincode, and a variety of other formats, it wasn't worth it to go custom and for Serai, we'll be using SCALE almost everywhere anyways.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use parity_scale_codec::{Encode, Decode};
|
||||
|
||||
use tokio::sync::RwLock;
|
||||
|
||||
use tendermint_machine::{ext::*, Message, TendermintMachine, TendermintHandle};
|
||||
@@ -45,7 +47,7 @@ impl Weights for TestWeights {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
#[derive(Clone, PartialEq, Debug, Encode, Decode)]
|
||||
struct TestBlock {
|
||||
id: TestBlockId,
|
||||
valid: Result<(), BlockError>,
|
||||
|
||||
Reference in New Issue
Block a user