Skip to content

Commit 756c9e3

Browse files
committed
style(node): correct notify-ordering comment and reuse ZERO_SHA in test
Review follow-ups on the two prior commits: - The peer-notify ordering comment claimed peers 'already learned via the gossip publish', but that publish is gated on a present p2p handle; with no handle (the very case the HTTP fallback exists for) it does not run. State the actual rationale: peer-notify is the lowest-priority best-effort step, ordered last so it cannot delay local broadcast or anchoring. - The all-zeros notify test still inlined the 40-hex literal; point it at the ZERO_SHA constant like the production path.
1 parent 76bba65 commit 756c9e3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎crates/gitlawb-node/src/api/repos.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,8 +1123,8 @@ pub async fn git_receive_pack(
11231123
// HTTP peer notification — notify all known peers to pull from us.
11241124
// This is the reliable fallback when Gossipsub p2p is not yet connected.
11251125
// Suppressed for repos the public cannot read. Runs last so a slow or
1126-
// unreachable peer cannot delay local GraphQL broadcast or Arweave
1127-
// anchoring above; peers already learned via the gossip publish.
1126+
// unreachable peer cannot delay the local GraphQL broadcast or Arweave
1127+
// anchoring above; this is the lowest-priority best-effort step.
11281128
if announce {
11291129
if let Ok(peers) = db_for_peers.list_peers().await {
11301130
for peer in peers {
@@ -2010,7 +2010,7 @@ mod tests {
20102010
let keypair = Keypair::generate();
20112011
let http_client = reqwest::Client::new();
20122012

2013-
let zero = "0000000000000000000000000000000000000000";
2013+
let zero = ZERO_SHA;
20142014
let new_sha = "5555555555555555555555555555555555555555";
20152015
let _mock = server
20162016
.mock("POST", SYNC_NOTIFY_PATH)

0 commit comments

Comments
 (0)