mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-21 10:30:41 +08:00
node: fetch refs announcements
Ref announcements contain the namespace (NID) and the SHA of the new `rad/sigrefs`. This information can be used by the fetch protocol to fetch only those `Oid`s for those namespaces. Add a new stage `SigrefsAnnouncement` that captures this behaviour by only asking for the advertised `Oid`s and updating the corresponding `rad/sigrefs` for each namespace. Note that this is a special case of the `SpecialRefs` stage and so the protocol chooses between these two by checking if there was announcement passed through. The following stage, `DataRefs`, stays the same. Note that this stage can only be activated via a `pull`, and `clone` stays the same. Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett
This commit is contained in:
@@ -828,6 +828,7 @@ where
|
||||
rid,
|
||||
remote,
|
||||
timeout,
|
||||
refs_at,
|
||||
..
|
||||
} => {
|
||||
log::trace!(target: "wire", "Processing fetch for {rid} from {remote}..");
|
||||
@@ -850,6 +851,7 @@ where
|
||||
fetch: FetchRequest::Initiator {
|
||||
rid,
|
||||
remote,
|
||||
refs_at,
|
||||
timeout,
|
||||
},
|
||||
stream,
|
||||
|
||||
Reference in New Issue
Block a user