예제 #1
0
    def test_invalid_batch(self):
        # add invalid flag to create_batches
        batch_list = self._create_batches(1, 1, valid_batch=False)
        batch = batch_list[0]
        valid = verifier.validate_batch(batch)
        self.assertFalse(valid)

        # create an invalid txn in the batch
        batch_list = self._create_batches(1, 1, valid_txn=False)
        batch = batch_list[0]
        valid = verifier.validate_batch(batch)
        self.assertFalse(valid)

        # create an invalid txn with bad batcher
        batch_list = self._create_batches(1, 1, valid_batcher=False)
        batch = batch_list[0]
        valid = verifier.validate_batch(batch)
        self.assertFalse(valid)
예제 #2
0
    def test_invalid_batch(self):
        # add invalid flag to create_batches
        batch_list = self._create_batches(1, 1, valid_batch=False)
        batch = batch_list[0]
        valid = verifier.validate_batch(batch)
        self.assertFalse(valid)

        # create an invalid txn in the batch
        batch_list = self._create_batches(1, 1, valid_txn=False)
        batch = batch_list[0]
        valid = verifier.validate_batch(batch)
        self.assertFalse(valid)

        # create an invalid txn with bad batcher
        batch_list = self._create_batches(1, 1, valid_batcher=False)
        batch = batch_list[0]
        valid = verifier.validate_batch(batch)
        self.assertFalse(valid)
예제 #3
0
 def test_valid_batch(self):
     batch_list = self._create_batches(1, 10)
     batch = batch_list[0]
     valid = verifier.validate_batch(batch)
     self.assertTrue(valid)
예제 #4
0
 def test_valid_batch(self):
     batch_list = self._create_batches(1, 10)
     batch = batch_list[0]
     valid = verifier.validate_batch(batch)
     self.assertTrue(valid)