diff options
Diffstat (limited to 'src/federation/party.rs')
| -rw-r--r-- | src/federation/party.rs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/federation/party.rs b/src/federation/party.rs index 788bde9..60b7e18 100644 --- a/src/federation/party.rs +++ b/src/federation/party.rs @@ -16,9 +16,9 @@ //! changed; with `--set`, set whole. One left empty is written with `--force` only; //! * `next`: the version after the current one, to change and propose: the current one //! numbered on, naming its hash, without its checkpoint (JSON), to standard output; -//! * `propose FILE`: proposes the version `FILE` holds (JSON), where it changes the -//! current one as a version must (`Version::changes_validly`), and says the proposal's -//! hash; with `--yes`, votes `true` on it too, as `vote` does; +//! * `propose FILE`: proposes the version `FILE` holds (JSON), where a party may back it +//! (`client::backable`), and says the proposal's hash; with `--yes`, votes `true` on it +//! too, as `vote` does; //! * `vote PROPOSAL yes|no`: votes on the proposal of hash `PROPOSAL` on the current //! version, by the record; with `--through`, through the node that votes for the //! party by itself and keeps its record, as such a party votes by hand; @@ -425,11 +425,8 @@ pub(crate) async fn main() -> Result<()> { let version = version_in(sub.get_one::<String>("file").expect("required"))?; let current = node.current().await?; signer.named_by(¤t)?; - let proposed = Version::read(&version) - .and_then(|proposed| proposed.changes_validly(Some(¤t)).map(|()| proposed)) - .map_err(|why| { - anyhow!("not a version changing version {}: {why}", current.number) - })?; + let proposed = client::backable(¤t, &version) + .map_err(|why| anyhow!("not a version a party may back: {why}"))?; sign( &node, &signer, |
