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

Disable retargeting on regtest to preserve compatibility with bitcoind #281

Closed

Conversation

guggero
Copy link
Member

@guggero guggero commented Jun 22, 2023

Replaces #256, now that btcsuite/btcd#1985 was merged.

Fixes #255.

cc @chappjc, @amanzag

@@ -2736,6 +2736,11 @@ func (b *blockManager) checkHeaderSanity(blockHeader *wire.BlockHeader,
func (b *blockManager) calcNextRequiredDifficulty(newBlockTime time.Time,
reorgAttempt bool) (uint32, error) {

// Some networks don't support difficulty retargeting.
if b.cfg.ChainParams.PoWNoRetargeting {
Copy link
Member

Choose a reason for hiding this comment

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

I think we want to go with this PR instead: #263

Then we just share all this code, and don't need to make changes in two areas.

@guggero guggero closed this Jun 22, 2023
@guggero guggero deleted the disable-regtest-retarget branch June 22, 2023 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regtest: "block target difficulty is higher than max"
2 participants