miner1 = Miner() miner2 = Miner() miner3 = Miner() print('Miners Generated...') # Show Advertised Transactions to start Verification print('Verification Start:') transacts = miner1.show() # Start Mining print('Mining...') h2 = miner1.mine(transacts.copy()) # Start of Consensus Mechanism. If Consensus happens, the block gets added to the Chain. print('Trying to Achieve Consensus:') if (miner2.consensus(h2) == 1 and miner3.consensus(h2) == 1): print('Verified.') print('Creating Block') print('Adding Block to Chain') blockchain.add_block(h2) else: print("Can't Verify.") # Show information in the Blockchain Now print('Printing Complete Blockchain:') c = 1 for i in blockchain.chn: print('Block', c) print('Transactions') for j in i._transactions: print(j.sender, 'to', j.receiver, 'Amount:', j.amount, 'Fees:', j.fees)