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)
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)
def test_valid_batch(self): batch_list = self._create_batches(1, 10) batch = batch_list[0] valid = verifier.validate_batch(batch) self.assertTrue(valid)
def test_valid_batch(self): batch_list = self._create_batches(1, 10) batch = batch_list[0] valid = verifier.validate_batch(batch) self.assertTrue(valid)