AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 18 Bitcoin

Fix flaky `PeerStatsTracker` test (#3280)

Public commit record

What the developer wrote

Authored by Bastien Teinturier

86/100 · Strong
Fix flaky `PeerStatsTracker` test (#3280)

If the test runs too quickly and the message is processed in less than
1 millisecond, there is a race condition since reading from the database
excludes the upper timestamp bound (`timestamp < now`).

We also remove our usage of the `BETWEEN` keyword for postgres.
The `BETWEEN` keyword is inclusive of both bounds, while we want to
exclude the upper bound to allow pagination.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a flaky automated test and, as a side effect, changes several PostgreSQL database queries to exclude the upper time bound instead of including it. The change is described by the author as a correctness fix for pagination, not a security fix. There is no direct evidence of an exploitable vulnerability.

Recommended action

No immediate security action required. Review whether any downstream callers of the changed PgAuditDb methods depend on the previously inclusive upper bound, as the semantic change could affect pagination or reporting results at interval boundaries.

Security signals we found

01

Change in database query boundary semantics (inclusive to half-open interval)

02

Author-described race condition in test, not production code

03

No input sanitization, authentication, or authorization changes

04

No vendor disclosure of security relevance

Risk score

Why this scored 18/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 2/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.