]> Untitled Git - bdk/commitdiff
Derive `PartialEq`, `Eq` on `SyncTime`
authorMax Fang <protonmail.com@maxfa.ng>
Thu, 15 Dec 2022 06:18:59 +0000 (22:18 -0800)
committerMax Fang <protonmail.com@maxfa.ng>
Sun, 29 Jan 2023 20:26:54 +0000 (12:26 -0800)
This enables e.g. `assert_eq!` comparisons of `SyncTime` in tests.

src/database/mod.rs

index e3e2b33102528da65b2229e81e70f01e9e26456c..7f26a1320420971d6d5ac018fe1ecb9acbb59fbd 100644 (file)
@@ -49,7 +49,7 @@ pub use memory::MemoryDatabase;
 /// Blockchain state at the time of syncing
 ///
 /// Contains only the block time and height at the moment
-#[derive(Clone, Debug, Serialize, Deserialize)]
+#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
 pub struct SyncTime {
     /// Block timestamp and height at the time of sync
     pub block_time: BlockTime,