aboutsummaryrefslogtreecommitdiffstats
path: root/src/federation/party.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/federation/party.rs')
-rw-r--r--src/federation/party.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/federation/party.rs b/src/federation/party.rs
index de8d9f9..f64746b 100644
--- a/src/federation/party.rs
+++ b/src/federation/party.rs
@@ -363,6 +363,9 @@ pub(crate) async fn main() -> Result<()> {
for line in changes {
println!(" {line}");
}
+ for line in check["writers"].as_array().into_iter().flatten() {
+ println!(" who writes {}", line.as_str().unwrap_or_default());
+ }
for (party, keys) in check["keys"].as_object().into_iter().flatten() {
println!(
"{party}'s keys: {} here, {} in the fork",
@@ -891,6 +894,13 @@ async fn again(node: &Node, signer: &Signer, record: &mut Record, path: &Path) -
async fn proposals(node: &Node) -> Result<()> {
let counts = node.counts().await?;
let current = current(&counts)?;
+ // The places holding a value, whose writer a proposal may move.
+ let places: Vec<&str> = counts["values"]
+ .as_object()
+ .into_iter()
+ .flatten()
+ .map(|(place, _)| place.as_str())
+ .collect();
let parties = |names: &JsonValue| -> String {
let names: Vec<&str> = names
.as_array()
@@ -933,6 +943,11 @@ async fn proposals(node: &Node) -> Result<()> {
for line in client::changes(&current.json, &version) {
println!(" {line}");
}
+ if let Ok(proposed) = Version::read(&version) {
+ for line in client::writers(&current, &proposed, places.iter().copied()) {
+ println!(" who writes {line}");
+ }
+ }
}
_ => println!(" the event {id} proposes no version of that hash"),
}