Hello,
Is it expected that the historical blockchain data saved by Bitcoin Core is
not ordered?
For example, the following code:
Sha256Hash previousBlockHash = null;
for(Block block : loader) {
System.out.println("block = " + block);
if(previousBlockHash != null && !previousBlockHash.equals(block.
getPrevBlockHash())) {
break;
}
previousBlockHash = block.getHash();
}
...which I run on the first file, "blk00000.dat", breaks on block
"00000000ceae2b1cb578f066bd08c672fe87814880671c205febb2d624184f21", block 124
on the main chain. The block that prints out directly before this is
"00000000ce2780c9640fde662ffbb07a10c9e96a226718875225a9a0fe6ac337", block 112
on the chain.
At first I thought this might have been some kind of orphaned chain, but it
seems that both of these are legitimate, and the missing blocks inbetween come
hundreds of blocks later in the file.
Any ideas? Am I doing something seriously wrong here?
Thanks
--
You received this message because you are subscribed to the Google Groups
"bitcoinj" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.