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 for regtest - option 2 #1274

Closed

Conversation

oscarguindzberg
Copy link
Contributor

Retargeting is disabled on bitcoin core for regtest, but enabled on bitcoinj for regtest.

See https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L257
See https://github.com/bitcoin/bitcoin/blob/master/src/pow.cpp#L54

If you have a bitcoind running on regtest with more than 10k blocks, and use bitcoinj to sync with it, it will reject blocks starting on block 10,000.

I wrote 2 different solutions:

Solution 1: The way it is implemented on bitcoin core (The other PR I created #1273)
Solution 2: Simple solution (this PR)

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 71.707% when pulling 3d322b7 on oscarguindzberg:noretargeting2 into f416dec on bitcoinj:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 71.65% when pulling 045a5e9 on oscarguindzberg:noretargeting2 into 8bd47a6 on bitcoinj:master.

@schildbach
Copy link
Member

Merged.

@schildbach schildbach closed this Jul 3, 2016
@oscarguindzberg oscarguindzberg deleted the noretargeting2 branch August 25, 2016 22:46
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.

None yet

3 participants