Example #1
0
 def test_transaction_check_invalid_transaction_list(self):
     block = Block(timestamp, transaction,  index, previous_hash)
     block.transactions = [transaction, incorrect_transaction]
     self.assertFalse(block.has_valid_transactions(block.transactions))
Example #2
0
 def test_transaction_check_correct_list(self):
     block = Block(timestamp, [transaction, transaction], index, previous_hash)
     self.assertTrue(block.has_valid_transactions(block.transactions))