# We loop through all blocks we may have missed since the last # block defined above while (block_number - last_block) > 0: last_block += 1 # Get full block block = rpc.get_block(last_block) #Match witness from block to witness from list and increase block production count of that witness for witness in watch_accounts: if block["witness"] == witness: count[witness] = count[witness] + 1 os.system('clear') print("{:^17} {:^17} {:^17} {:^17}".format("witness","produced","missed","reliability")) for witness in watch_accounts: #Gets missed block count from blockchain(for each witness) witness_info = rpc.get_witness_by_account(witness) missed_count = witness_info["total_missed"] #outputs statistics if produced more than 50 blocks if count[witness]>50: reliability = count[witness]/(count[witness] + missed_count)*100 print("{:^17} {:^17} {:^17} {:^17}".format(witness,count[witness],missed_count,reliability)) # Sleep for one block time.sleep(block_interval)