Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: Painted_Red on April 15, 2014, 06:37:57 AM



Title: bitcoinj, litecoinj-new. VerificationException: Difficulty target is bad
Post by: Painted_Red on April 15, 2014, 06:37:57 AM
Hi,
I want to download the litecoin blocks and I'm using litecoinj-new and bitcoinj API libs. On attempt to download the block I've got:
Code:
09:35:29 9 AbstractBlockChain.add: 4daf3f5d54e7a2d448bd185b0f68fbc97d811ffa1a8bade3b4c1cdbe8a91c90c
09:35:29 9 Peer.processHeaders: Block header verification failed
com.google.litecoin.core.VerificationException: Could not verify block 4daf3f5d54e7a2d448bd185b0f68fbc97d811ffa1a8bade3b4c1cdbe8a91c90c
v1 block:
   previous block: f5ae71e26c74beacc88382716aced69cddf3dffff24f384e1808905e0188f68f
   merkle root: 3090c24778a61763e1d060abf382ebcb9bf311a86dbe4d1dcc1218324e1f2ff8
   time: [1365456253] Tue Apr 09 00:24:13 EEST 2013
   difficulty target (nBits): 504365055
   nonce: 2790195456

at com.google.litecoin.core.AbstractBlockChain.add(AbstractBlockChain.java:249)
at com.google.litecoin.core.Peer.processHeaders(Peer.java:436)
at com.google.litecoin.core.Peer.processMessage(Peer.java:311)
at com.google.litecoin.core.Peer.access$400(Peer.java:54)
at com.google.litecoin.core.Peer$PeerHandler.messageReceived(Peer.java:264)
at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:88)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:787)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:536)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:485)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:555)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:107)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:88)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: com.google.litecoin.core.VerificationException: Difficulty target is bad: 110427836236357352041769395878404723568785424659630784333489133269811200 or 504365055
at com.google.litecoin.core.Block.getDifficultyTargetAsInteger(Block.java:651)
at com.google.litecoin.core.Block.checkProofOfWork(Block.java:665)
at com.google.litecoin.core.Block.verifyHeader(Block.java:792)
at com.google.litecoin.core.AbstractBlockChain.add(AbstractBlockChain.java:361)
at com.google.litecoin.core.AbstractBlockChain.add(AbstractBlockChain.java:239)
Does anyone know what the problem is and can give me the hint how to fix it?