Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Use type-safe time in txorphanage #30170

Merged
merged 1 commit into from
May 29, 2024

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented May 24, 2024

This allows to remove manual conversions like multiplication by 60, and uses a type-safe type instead of a raw int64_t.

@DrahtBot
Copy link
Contributor

DrahtBot commented May 24, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK epiccurious, dergoegge, brunoerg
Concept ACK stickies-v

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #30186 (fuzz: increase txorphan harness stability by marcofleon)
  • #29641 (scripted-diff: Use LogInfo/LogDebug over LogPrintf/LogPrint by maflcko)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@stickies-v
Copy link
Contributor

Concept ACK

@epiccurious
Copy link
Contributor

utACK fa6d489.

@DrahtBot DrahtBot requested a review from stickies-v May 24, 2024 17:24
Copy link
Member

@dergoegge dergoegge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review ACK fa6d489

@@ -118,12 +119,12 @@ void TxOrphanage::LimitOrphans(unsigned int max_orphans, FastRandomContext& rng)
LOCK(m_mutex);

unsigned int nEvicted = 0;
static int64_t nNextSweep;
int64_t nNow = GetTime();
static NodeSeconds nNextSweep;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of scope for this PR but this global is probably the source of instability in the txorphan harness.

Copy link
Contributor

@brunoerg brunoerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK fa6d489

@fanquake fanquake merged commit 5895602 into bitcoin:master May 29, 2024
16 checks passed
@maflcko maflcko deleted the 2405-type-time-tx-orphan branch May 29, 2024 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants