Esempio n. 1
0
 def test_integrity_modified_transaction_list_null(self):
     block = Block(timestamp, [transaction, Transaction(from_address, to_address, amount, node_identifier)], index, previous_hash)
     block.mine_block(2)
     block.transactions = None
     self.assertNotEqual(block.currentHash, block.calculate_hash())
Esempio n. 2
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))