Make unified acceptance state authoritative
This commit is contained in:
parent
3882ae72f7
commit
18ea9d81d5
7 changed files with 41 additions and 2 deletions
|
|
@ -263,6 +263,16 @@ pub fn coordinator_acceptance_cache(store_path: &Path) -> anyhow::Result<CultCac
|
|||
Ok(cache)
|
||||
}
|
||||
|
||||
pub fn read_accepted_coordinator_state(
|
||||
store_path: &Path,
|
||||
) -> anyhow::Result<Option<EpiphanyThreadState>> {
|
||||
let cache = coordinator_acceptance_cache(store_path)?;
|
||||
cache
|
||||
.get::<EpiphanyThreadStateEntry>(THREAD_STATE_KEY)?
|
||||
.map(|entry| entry.state())
|
||||
.transpose()
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum EpiphanyAcceptancePrerequisite {
|
||||
Eyes(EyesEvidencePacket),
|
||||
|
|
|
|||
|
|
@ -135,6 +135,7 @@ pub use coordinator_acceptance::completed_role_finding;
|
|||
pub use coordinator_acceptance::coordinator_acceptance_cache;
|
||||
pub use coordinator_acceptance::enforce_acceptance_receipt_proofs;
|
||||
pub use coordinator_acceptance::load_launch_organ_contract;
|
||||
pub use coordinator_acceptance::read_accepted_coordinator_state;
|
||||
pub use coordinator_acceptance::reorient_acceptance_claimed_effects;
|
||||
pub use coordinator_acceptance::role_acceptance_claimed_effects;
|
||||
pub use coordinator_acceptance::role_acceptance_enforceable_receipts;
|
||||
|
|
|
|||
Reference in a new issue