diff options
Diffstat (limited to 'src/federation/store')
| -rw-r--r-- | src/federation/store/mod.rs | 4 | ||||
| -rw-r--r-- | src/federation/store/testfold.rs | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/federation/store/mod.rs b/src/federation/store/mod.rs index ad1720d..ec3fb56 100644 --- a/src/federation/store/mod.rs +++ b/src/federation/store/mod.rs @@ -72,6 +72,10 @@ pub(crate) trait Fold { /// reading need of the events' history. type State: Clone; + /// Its name, by which a swarm holding a store names its fold (`docs/store.md`, On + /// Automerge). + const NAME: &'static str; + /// The most bytes an event may have: larger ones are none. const LARGEST: usize; diff --git a/src/federation/store/testfold.rs b/src/federation/store/testfold.rs index baaba55..bf23321 100644 --- a/src/federation/store/testfold.rs +++ b/src/federation/store/testfold.rs @@ -289,6 +289,8 @@ pub(crate) struct TestFold; impl Fold for TestFold { type State = State; + const NAME: &'static str = "test"; + const LARGEST: usize = 64 * 1024; fn dependencies(event: &[u8]) -> Option<Vec<Id>> { |
