"""
----------------------v1.0.0----------------------
  ____                 _      _           _       
 / ___| ___   ___   __| | ___| |__   __ _(_)_ __  
| |  _ / _ \ / _ \ / _` |/ __| '_ \ / _` | | '_ \ 
| |_| | (_) | (_) | (_| | (__| | | | (_| | | | | |
 \____|\___/ \___/ \__,_|\___|_| |_|\__,_|_|_| |_|

------------------Ryan & Teuntje------------------
"""
from helpers.DatabaseHelper import DatabaseHelper
from helpers.MenuHelper import MenuHelper
from helpers import UtilityHelper as utilityHelper

if __name__ == "__main__":
    # start db connection
    db = DatabaseHelper("../data/goodchain.db")
    db.checkMigrations()

    # check ledger and pool file
    if utilityHelper.createFile("../data/ledger.dat"):
        print("Created ledger")
    if utilityHelper.createFile("../data/transaction_pool.dat"):
        print("Created transaction pool")

    # start menu
    menu = MenuHelper(db)
    while(True):
        menu.runStartMenu()
        
        if menu.user != None:
            menu.runUserMainMenu()