Currently enabled for topOnly nodes only. This will detect if the node is on a divergent chain, and will force a bootstrap or resync (depending on settings) in order to rejoin the main chain.
LOGGER.info("Error: block at height {} with signature {} doesn't match checkpoint sig: {}. Bootstrapping...",checkpoint.height,Base58.encode(blockData.getSignature()),checkpoint.signature);
needsArchiveRebuild=true;
break;
}
LOGGER.info("Block at height {} matches checkpoint signature",blockData.getHeight());
}
}
}
// Check first block is Genesis Block
if(!isGenesisBlockValid()||needsArchiveRebuild){
try{
rebuildBlockchain();
}catch(InterruptedExceptione){
thrownewDataException(String.format("Interrupted when trying to rebuild blockchain: %s",e.getMessage()));
}
}
// We need to create a new connection, as the previous repository and its connections may be been