Files
heartwood/radicle-cob/src/change.rs
T
cloudhead 457b82f723 cob: Evaluate COB state eagerly
Instead of returning histories from `radicle-cob`, we return an
evaluated object which we build during initial graph traversal.

We do this so that branches can be correctly pruned when operations are
invalid at the application level. This way, new operations are not
building on top of invalid ones contained in the history.

To achieve this, we introduce a new `Evaluate` trait that is implemented
by all COBs, and we make change graph evaluation fallible.

Doing this means that we get `apply` errors returned for free when an
invalid transaction is applied, and no longer need to check for action
validity in multiple places.

We also implement a new `Dag::prune` method to avoid having to copy
graph nodes during traversal.
2023-09-11 23:25:28 +02:00

12 lines
297 B
Rust

// Copyright © 2021 The Radicle Link Contributors
use git_ext::Oid;
pub mod store;
pub use store::{Contents, EntryId, Storage, Template, Timestamp};
use crate::signatures::ExtendedSignature;
/// A single change in the change graph.
pub type Entry = store::Entry<Oid, Oid, ExtendedSignature>;