aboutsummaryrefslogtreecommitdiffstats
path: root/src/federation/held.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/federation/held.rs')
-rw-r--r--src/federation/held.rs23
1 files changed, 3 insertions, 20 deletions
diff --git a/src/federation/held.rs b/src/federation/held.rs
index 02b94d2..1e1e0d4 100644
--- a/src/federation/held.rs
+++ b/src/federation/held.rs
@@ -29,7 +29,7 @@ use anyhow::{Context, Result, bail};
use serde::{Deserialize, Serialize};
use tracing::{error, info, warn};
-use super::client::{self, Record};
+use super::client::Record;
use super::event::{self, Does, Event, Signed};
use super::fold::Federation;
use super::revision::Feature;
@@ -756,25 +756,8 @@ impl Holding {
// On an event proposing it, of a checkpoint one above the heads it
// names, so a version event may be written on it, which the node's
// heads, holding what is beside them, may not be; and on the nays that
- // freed its party (`client::building`).
- let state = store.state();
- let Some(proposing) =
- state.proposing(&current.hash, &proposal).first().copied()
- else {
- if hand.is_some() {
- return Err(format!(
- "no event proposing {proposal} is above the heads it names: \
- no version event is written on a vote on it"
- ));
- }
- continue;
- };
- let checkpoint = state
- .proposal(&proposal)
- .and_then(|json| Version::read(json).ok())
- .and_then(|version| version.checkpoint)
- .is_some();
- let on = match client::building(proposing, checkpoint, &nays) {
+ // freed its party: where its store takes it (`vote::builds_on`).
+ let on = match vote::builds_on(store, party, &proposal, yes, &nays) {
Ok(on) => on,
Err(why) if hand.is_some() => return Err(why),
Err(_) => continue,