diff options
| author | tv <tv@krebsco.de> | 2026-11-20 01:28:41 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-20 02:38:56 +0100 |
| commit | 96a733e1ccbf6dab2d69f263d655e487ac54c20d (patch) | |
| tree | abfa6c292134a224b53e4a70c60a31721577a7bc /src/federation/harness.rs | |
| parent | 7a178877d3b979ae6bd0e48ddb06363a0d50affc (diff) | |
federation: revision 2, the federation's name
A version may give its federation a name (`name`, spelled as a party's),
under a revision that has names: `federation-name`, revision 2. The
first version's is in the root, so a rehearsal named otherwise is
another federation, though its parties, keys, nodes and rules are the
same; a later version changes the name as anything else, which changes
what the federation is called, not which it is. A version giving a name
under an earlier revision is none.
What a version does says so, in words: it names the federation, renames
it, or drops its name. Half the generated histories begin at the newest
revision now, their versions naming the federation anew now and then;
those of the revisions before are generated as they were.
Diffstat (limited to 'src/federation/harness.rs')
| -rw-r--r-- | src/federation/harness.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/federation/harness.rs b/src/federation/harness.rs index f14736d..04308da 100644 --- a/src/federation/harness.rs +++ b/src/federation/harness.rs @@ -138,6 +138,8 @@ pub(crate) struct Spec { pub(crate) parties: Vec<SpecParty>, /// The revision it follows: named where it isn't the base revision. pub(crate) revision: Revision, + /// The federation's name, where it gives one. + pub(crate) name: Option<String>, /// Each rule: its path and its writer. pub(crate) rules: Vec<(String, Json)>, pub(crate) checkpoint: Option<Vec<Id>>, @@ -151,6 +153,7 @@ impl Spec { number: 0, changes: None, revision: Revision::default(), + name: None, parties: parties .iter() .enumerate() @@ -256,6 +259,9 @@ impl Spec { if self.revision != Revision::default() { members.push(("revision", str(&self.revision.id().to_string()))); } + if let Some(name) = &self.name { + members.push(("name", str(name))); + } object(members) } |
