'Test the crawler to fetch blocks starting from a negative sequence number.'

def test_crawl_blocks_negative_sequence_number(self):

    (node, other, crawler) = self.create_nodes(3)
    TestTrustChainCommunity.create_block(node, other, self._create_target(node, other), {})
    TestTrustChainCommunity.create_block(node, other, self._create_target(node, other), {})
    TestTrustChainCommunity.create_block(node, other, self._create_target(node, other), {})
    self.clean_database(crawler)
    self.assertBlocksInDatabase(crawler, 0)
    TestTrustChainCommunity.crawl_node(crawler, node, self._create_target(crawler, node), (-2))
    self.assertBlocksInDatabase(node, 6)
    self.assertBlocksInDatabase(crawler, 4)
    self.assertIsNone(self.get_node_sq_from_db(crawler, node, 1))
    self.assertIsNone(self.get_node_sq_from_db(crawler, other, 1))
    self.assertIsNotNone(self.get_node_sq_from_db(crawler, node, 2))
    self.assertIsNotNone(self.get_node_sq_from_db(crawler, other, 2))
    self.assertIsNotNone(self.get_node_sq_from_db(crawler, node, 3))
    self.assertIsNotNone(self.get_node_sq_from_db(crawler, other, 3))
