Introduce a node event for canonical reference updates
Whenever the node fetches new updates, it checks if canonical references can be
updated. The node has learned how to return these results and emit them as node
events. This is a breaking change since it adds a new variant the Event type,
which is not forwards-compatible.
9 files changed
+230
-34
690f6b02
→
7d2f0e38
modified crates/radicle-node/src/test/node.rs
@@ -352,6 +352,72 @@ impl<G: Signer<Signature> + cyphernet::Ecdh> NodeHandle<G> {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-node/src/test/simulator.rs
@@ -663,6 +663,7 @@ where
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified crates/radicle-node/src/tests.rs
@@ -1589,6 +1589,7 @@ fn test_queued_fetch_from_ann_same_rid() {
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified crates/radicle-node/src/tests/e2e.rs
@@ -1504,3 +1504,43 @@ fn test_channel_reader_limit() {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
modified crates/radicle-node/src/worker/fetch.rs
@@ -1,5 +1,8 @@
| + | |
| + | |
|
|
|
|
| + | |
|
|
|
|
|
@@ -18,7 +21,7 @@ use radicle::storage::{
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -128,9 +131,13 @@ impl Handle {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -147,6 +154,7 @@ impl Handle {
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -356,36 +364,37 @@ where
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
|
|
| + | |
|
|
|
|
|
@@ -421,9 +430,11 @@ fn set_canonical_refs(repo: &Repository, applied: &Applied) -> Result<(), error:
|
|
|
|
|
|
| + | |
| + | |
|
|
|
|
|
|
|
|
| - | |
| + | |
|
modified crates/radicle-protocol/src/service.rs
@@ -1177,6 +1177,7 @@ where
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -1198,6 +1199,16 @@ where
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-protocol/src/worker/fetch.rs
@@ -1,14 +1,17 @@
|
|
|
|
| - | |
| + | |
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
|
| + | |
| + | |
|
|
|
|
|
@@ -21,6 +24,7 @@ impl FetchResult {
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -28,11 +32,41 @@ impl FetchResult {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified crates/radicle/CHANGELOG.md
@@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle/src/node/events.rs
@@ -9,7 +9,7 @@ use std::time;
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -21,6 +21,7 @@ pub const MAX_PENDING_EVENTS: usize = 8192;
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -122,6 +123,15 @@ pub enum Event {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -214,6 +224,20 @@ impl<T: Clone> Emitter<T> {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|