From 295ba74159e371bb9082fcbdada5eaf78de5d1dc Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 19 Nov 2026 01:48:58 +0000 Subject: continuum-party: warns before a true that only every nay left ends A `true` holds its party until its proposal passes or is dead, and only other parties' nays make it dead: where the parties yet to vote are too few, one of them staying quiet binds the party on that version for good. The client says so before it casts such a `true` (`client::binding`): where ending the proposal would take every party yet to vote, or more, and those are a third of the parties or fewer. --- src/federation/party.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/federation/party.rs') diff --git a/src/federation/party.rs b/src/federation/party.rs index 162f8bd..655d4c2 100644 --- a/src/federation/party.rs +++ b/src/federation/party.rs @@ -734,6 +734,20 @@ async fn vote( let kept = record .may_vote(¤t, proposal, &proposed, yes, &nays) .map_err(|why| anyhow!(why))?; + if yes { + let parties = |what: &str| -> BTreeSet { + ballots[proposal.to_string()][what] + .as_array() + .into_iter() + .flatten() + .filter_map(|party| party.as_str().map(str::to_owned)) + .collect() + }; + if let Some(why) = client::binding(¤t, &signer.party, &parties("yes"), &parties("no")) + { + eprintln!("Warning: {why}"); + } + } // On the events proposing it the node shows, those above the heads it names for a // checkpoint, so a version event may be written on it. let cast = signer.sign(&proposals, event::vote(current.hash, proposal, yes))?; -- cgit v1.3.1