class NodeBlockProcessor implements BlockProcessor {

    @Override
    public void processSkeletonRequest(@Nonnull final MessageChannel sender, long requestId, long startNumber) {
        logger.trace("Processing skeleton request {} {} from {}", requestId, startNumber, sender.getPeerNodeID());
        int skeletonStep = syncConfiguration.getChunkSize();
        Block blockStart = this.getBlockFromBlockchainStore(startNumber);

        // If we don't have a block with the requested number, we ignore the message
        if (blockStart == null) {
            // Don't waste time sending an empty response.
            return;
        }

        // We always include the skeleton block immediately before blockStart, even if it's Genesis
        long skeletonStartHeight = (blockStart.getNumber() / skeletonStep) * skeletonStep;
        List<BlockIdentifier> blockIdentifiers = new ArrayList<>();
        long skeletonNumber = skeletonStartHeight;
        int maxSkeletonChunks = syncConfiguration.getMaxSkeletonChunks();
        long maxSkeletonNumber = Math.min(this.getBestBlockNumber(), skeletonStartHeight + skeletonStep * maxSkeletonChunks);

        for (; skeletonNumber < maxSkeletonNumber; skeletonNumber += skeletonStep) {
            byte[] skeletonHash = getSkeletonHash(skeletonNumber);
            blockIdentifiers.add(new BlockIdentifier(skeletonHash, skeletonNumber));
        }

        // We always include the best block as part of the Skeleton response
        skeletonNumber = Math.min(this.getBestBlockNumber(), skeletonNumber + skeletonStep);
        byte[] skeletonHash = getSkeletonHash(skeletonNumber);
        blockIdentifiers.add(new BlockIdentifier(skeletonHash, skeletonNumber));
        SkeletonResponseMessage responseMessage = new SkeletonResponseMessage(requestId, blockIdentifiers);

        sender.sendMessage(responseMessage);
    }

    public  NodeBlockProcessor(
            @Nonnull final BlockStore store,
            @Nonnull final Blockchain blockchain,
            @Nonnull final BlockNodeInformation nodeInformation,
            @Nonnull final BlockSyncService blockSyncService,
            @Nonnull final SyncConfiguration syncConfiguration);

}