Skip to content

add regtest/fakechain#607

Merged
Boog900 merged 1 commit intomainfrom
regtest
May 5, 2026
Merged

add regtest/fakechain#607
Boog900 merged 1 commit intomainfrom
regtest

Conversation

@Boog900
Copy link
Copy Markdown
Member

@Boog900 Boog900 commented May 5, 2026

Adds a regtest mode that matches monerod's regtest.

Useful for testing.

@github-actions github-actions Bot added A-consensus Area: Related to consensus. A-helper Area: Related to cuprate-helper. A-binaries Area: Related to binaries. labels May 5, 2026
@Boog900 Boog900 marked this pull request as ready for review May 5, 2026 11:36
Comment on lines +116 to +126
pub const fn hard_fork_state(&self, current_time: u64) -> HardForkState {
let last_fork_time = self.0[NUMB_OF_HARD_FORKS - 1].time;
if current_time >= last_fork_time.saturating_add(FORKED_TIME) {
HardForkState::LikelyForked
} else if current_time >= last_fork_time.saturating_add(UPDATE_TIME) {
HardForkState::UpdateNeeded
} else {
HardForkState::Ready
}
}

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.

In preparation of FCMP++ I presume ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No this is an old system for when monerod had HFs every 6 months to combat ASICs. We need it as monerod still exposes this in the RPC.

@Boog900 Boog900 merged commit ef6da9d into main May 5, 2026
13 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-binaries Area: Related to binaries. A-consensus Area: Related to consensus. A-helper Area: Related to cuprate-helper.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants