Hello guys,
Can you help me with the difficulty adjustment in bitcoinj? I have these settings in the MainNetParams.java:
packetMagic = 0xf9beb4d9L;
genesisBlock.setDifficultyTarget(486604799L);
genesisBlock.setTime(1408829075L);
genesisBlock.setNonce(3470356538L);
id = ID_MAINNET;
subsidyDecreaseBlockCount = 210000;
spendableCoinbaseDepth = 100;
checkpoints.put(2015, new Sha256Hash("00000000cac5b0f9b3eb252f8273701752765fa4f1fdbd4101d3937cac4dd2aa"));
checkpoints.put(2016, new Sha256Hash("000000000dcb1920a540da59ab0306b0d40b047650ada9af46924ec47f84e183"));
checkpoints.put(17951, new Sha256Hash("000000000000773f09329ac46f03357d777f8563d3610ea56f2577e65c3f1099"));
checkpoints.put(19990, new Sha256Hash("000000000000978242fab50fed6d182531ada338df730b4ee8fe97045956a0aa"));
checkpoints.put(20000, new Sha256Hash("000000000001614311d0f0d912ef0e55b9581cea7757454f889048ae1a0cac2f"));
checkpoints.put(24508, new Sha256Hash("0000000000001022c6fc422b79a9f24b05fce756ca8bce489a8f1ecc24f1ea95"));
checkpoints.put(25009, new Sha256Hash("00000000000003b4fb3e0ef3606a72c4e9d254f242555c65b1f566dbb2bd111c"));
I can compile it, but when run mvn exec:java -Dexec.mainClass=org.bitcoinj.tools.BuildCheckpoints see this error (and sleep after the error):
03:23:36 13 Peer.processHeaders: Block header verification failed
org.bitcoinj.core.VerificationException: Could not verify block 000000000dcb1920a540da59ab0306b0d40b047650ada9af46924ec47f84e183
v2 block:
previous block: 00000000cac5b0f9b3eb252f8273701752765fa4f1fdbd4101d3937cac4dd2aa
merkle root: 3529dbcb4b93c126aa4711fa9c2a72acce47bb8f1f10e859c7175daef3344460
time: [1410172566] 2014-09-08T10:36:06Z
difficulty target (nBits): 473956288
nonce: 2788947264
the coin is mobiuscoin, the block explorer is
http://mobiblocks.cointech.net and can you see that the 2015 is with diff 1, 2016 is with diff 4.
Any idea where is the problem and how to solve it?
When I compile bitcoin-wallet (4.30) with removed chepoints.txt file, the wallet retrieve blocks 0-2015 and stop the download. I think that is the same problem.
Best Regards,
Rossen