mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-29 09:09:58 -07:00
20 lines
425 B
Rust
20 lines
425 B
Rust
use std::path::Path;
|
|
|
|
use brk_structs::Height;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
use crate::path_to_modified_time;
|
|
|
|
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
|
|
#[repr(C)]
|
|
pub struct BlkRecap {
|
|
pub max_height: Height,
|
|
pub modified_time: u64,
|
|
}
|
|
|
|
impl BlkRecap {
|
|
pub fn has_different_modified_time(&self, blk_path: &Path) -> bool {
|
|
self.modified_time != path_to_modified_time(blk_path)
|
|
}
|
|
}
|