diff options
Diffstat (limited to 'src/federation/harness.rs')
| -rw-r--r-- | src/federation/harness.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/federation/harness.rs b/src/federation/harness.rs index 80328dd..42ee870 100644 --- a/src/federation/harness.rs +++ b/src/federation/harness.rs @@ -248,4 +248,14 @@ impl Spec { pub(crate) fn hash(&self) -> Id { Id::of(&self.json().bytes()) } + + /// The root of a federation whose first version this is. + pub(crate) fn root(&self) -> Vec<u8> { + event::Checkpoint { + at: Vec::new(), + keeps: Vec::new(), + version: super::version::Version::read(&self.json()).expect("a version"), + } + .bytes() + } } |
