discovery/test: update mock to support iterator-based UpdatesInHorizon
What changed, and why it matters
This is a small test-only change that adds two comment lines to a mock implementation in a test file. It does not alter any production code, network behavior, or security logic.
No action required. This is a non-functional documentation-only change in test code.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit adds explanatory comments to the mockChannelGraphTimeSeries.UpdatesInHorizon method in discovery/syncer_test.go. The method already implemented the iterator-based UpdatesInHorizon interface; the change only documents that the mock receives a slice from a response channel and yields each message. No code logic was modified.
Changed components
discovery/syncer_test.goInspect captured patch +2 / −0
diff --git a/discovery/syncer_test.go b/discovery/syncer_test.go
index 72ad2ce..faef40b 100644
--- a/discovery/syncer_test.go
+++ b/discovery/syncer_test.go
@@ -94,6 +94,8 @@ func (m *mockChannelGraphTimeSeries) UpdatesInHorizon(chain chainhash.Hash,
chain, startTime, endTime,
}
+ // We'll get the response from the channel, then yield it
+ // immediately.
msgs := <-m.horizonResp
for _, msg := range msgs {
if !yield(msg, nil) {
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.