Skip to content

refactor: Use type-safe time in txorphanage - #30170

Merged
fanquake merged 1 commit into
bitcoin:masterfrom
maflcko:2405-type-time-tx-orphan
May 29, 2024
Merged

fanquake merged 1 commit into
bitcoin:masterfrom
maflcko:2405-type-time-tx-orphan

Conversation

@maflcko

@maflcko maflcko commented May 24, 2024

Copy link
Copy Markdown
Member

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

@DrahtBot

DrahtBot commented May 24, 2024 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

Concept ACK

@epiccurious

Copy link
Copy Markdown
Contributor

utACK fa6d489.

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

@dergoegge dergoegge left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Code review ACK fa6d489

Comment thread src/txorphanage.cpp
unsigned int nEvicted = 0;
static int64_t nNextSweep;
int64_t nNow = GetTime();
static NodeSeconds nNextSweep;

Copy link
Copy Markdown
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.

@brunoerg brunoerg left a comment

Copy link
Copy Markdown
Contributor

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
@maflcko
maflcko deleted the 2405-type-time-tx-orphan branch May 29, 2024 08:34
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jul 19, 2024
Summary:
```
This allows to remove manual conversions like multiplication by 60, and uses a type-safe type instead of a raw int64_t.
```

Backport of [[bitcoin/bitcoin#30170 | core#30170]].

Depends on D16498.

Test Plan:
  ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Differential Revision: https://reviews.bitcoinabc.org/D16501
roqqit pushed a commit to doged-io/doged that referenced this pull request Aug 1, 2024
Summary:
```
This allows to remove manual conversions like multiplication by 60, and uses a type-safe type instead of a raw int64_t.
```

Backport of [[bitcoin/bitcoin#30170 | core#30170]].

Depends on D16498.

Test Plan:
  ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Differential Revision: https://reviews.bitcoinabc.org/D16501
@bitcoin bitcoin locked and limited conversation to collaborators May 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants