Skip to content

Commit 0ac7a22

Browse files
committed
fix(cardano-blockchain-types): add serde serialize to slot
Signed-off-by: bkioshn <[email protected]>
1 parent 3a74de4 commit 0ac7a22

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

rust/cardano-blockchain-types/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ dashmap = "6.1.0"
3333
blake2b_simd = "1.0.2"
3434
minicbor = { version = "0.25.1", features = ["alloc"] }
3535
num-traits = "0.2.19"
36-
ed25519-dalek = "2.1.1"
36+
ed25519-dalek = "2.1.1"
37+
serde = "1.0.210"

rust/cardano-blockchain-types/src/slot.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
//! Block Slot
22
33
use std::{cmp::Ordering, ops::{MulAssign, Sub}};
4+
use serde::Serialize;
45

56
use crate::conversion::from_saturating;
67

7-
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Default)]
8+
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Default, Serialize)]
89

910
/// Slot on the blockchain, typically one slot equals one second. However chain
1011
/// parameters can alter how long a slot is.

0 commit comments

Comments
 (0)