TODOs:
- ensure sync goes both way
- finish sending blocks to other nodes when they need them before deleting
This commit is contained in:
Alex Auvolat
2020-04-17 17:09:57 +02:00
parent e41ce4d815
commit 69f1d8fef2
9 changed files with 236 additions and 112 deletions
+5
View File
@@ -44,6 +44,7 @@ impl TableSchema for BlockRefTable {
type P = Hash;
type S = UUID;
type E = BlockRef;
type Filter = ();
async fn updated(&self, old: Option<Self::E>, new: Option<Self::E>) {
let block = &old.as_ref().or(new.as_ref()).unwrap().block;
@@ -60,4 +61,8 @@ impl TableSchema for BlockRefTable {
}
}
}
fn matches_filter(entry: &Self::E, _filter: &Self::Filter) -> bool {
!entry.deleted
}
}