diff --git a/radicle-crdt/src/change.rs b/radicle-crdt/src/change.rs index 27da448c..3c5c258f 100644 --- a/radicle-crdt/src/change.rs +++ b/radicle-crdt/src/change.rs @@ -6,10 +6,8 @@ use serde::{Deserialize, Serialize}; use crate::clock::LClock; /// Identifies a change. -pub type ChangeId = (LClock, Author); +pub type ChangeId = (LClock, ActorId); /// The author of a change. -pub type Author = PublicKey; -/// Alias for `Author`. pub type ActorId = PublicKey; /// The `Change` is the unit of replication. @@ -20,7 +18,7 @@ pub struct Change { /// The action carried out by this change. pub action: A, /// The author of the change. - pub author: Author, + pub author: ActorId, /// Lamport clock. pub clock: LClock, } diff --git a/radicle/src/cob/thread.rs b/radicle/src/cob/thread.rs index 47d22aa1..f687c6b2 100644 --- a/radicle/src/cob/thread.rs +++ b/radicle/src/cob/thread.rs @@ -10,20 +10,18 @@ use serde::{Deserialize, Serialize}; use crate::cob::common::{Reaction, Tag}; use crate::cob::store; use crate::cob::{History, TypeName}; -use crate::crypto::{PublicKey, Signer}; +use crate::crypto::Signer; use crdt::clock::LClock; use crdt::lwwreg::LWWReg; use crdt::lwwset::LWWSet; use crdt::redactable::Redactable; -use crdt::{Change, ChangeId, Semilattice}; +use crdt::{ActorId, Change, ChangeId, Semilattice}; /// Type name of a thread. pub static TYPENAME: Lazy = Lazy::new(|| FromStr::from_str("xyz.radicle.thread").expect("type name is valid")); -/// Alias for `Author`. -pub type ActorId = PublicKey; /// Identifies a comment. pub type CommentId = ChangeId; @@ -383,7 +381,7 @@ mod tests { let mut changes = Vec::new(); let mut permutations: [Vec>; N] = array::from_fn(|_| Vec::new()); let mut clock = LClock::default(); - let author = PublicKey::from([0; 32]); + let author = ActorId::from([0; 32]); for action in gen.take(g.size().min(8)) { let clock = clock.tick();