Nearly workign
This commit is contained in:
@@ -11,6 +11,12 @@ pub(crate) struct TransactionList {
|
||||
pub(crate) list: ListCrdt<Transaction>,
|
||||
}
|
||||
|
||||
impl TransactionList {
|
||||
pub(crate) fn view_sha(&self) -> String {
|
||||
sha256::digest(serde_json::to_string(&self.list.view()).unwrap().as_bytes()).to_string()
|
||||
}
|
||||
}
|
||||
|
||||
/// A fake Transaction struct we can use as a simulated payload
|
||||
#[add_crdt_fields]
|
||||
#[derive(Clone, CrdtNode, Serialize, Deserialize)]
|
||||
|
||||
Reference in New Issue
Block a user