start_prep_time = time.time() db2 = dataset.connect(databaseConnector2) db = dataset.connect(databaseConnector) transferStorage = TransferTrx(db) # Create keyStorage trxStorage = TrxDB(db2) keyStorage = KeysDB(db2) memberStorage = MemberDB(db2) # accountStorage = MemberHistDB(db) confStorage = ConfigurationDB(db2) transactionStorage = TransactionMemoDB(db2) transferMemosStorage = TransferMemoDB(db2) accountStorage = AccountsDB(db2) accounts = accountStorage.get() accounts_data = accountStorage.get_data() other_accounts = accountStorage.get_transfer() conf_setup = confStorage.get() last_cycle = conf_setup["last_cycle"] share_cycle_min = conf_setup["share_cycle_min"] sp_share_ratio = conf_setup["sp_share_ratio"] rshares_per_cycle = conf_setup["rshares_per_cycle"] del_rshares_per_cycle = conf_setup["del_rshares_per_cycle"] upvote_multiplier = conf_setup["upvote_multiplier"] last_paid_post = conf_setup["last_paid_post"] last_paid_comment = conf_setup["last_paid_comment"] last_delegation_check = conf_setup["last_delegation_check"]
start_prep_time = time.time() db2 = dataset.connect(databaseConnector2) db = dataset.connect(databaseConnector) transferStorage = TransferTrx(db) # Create keyStorage trxStorage = TrxDB(db2) keyStorage = KeysDB(db2) memberStorage = MemberDB(db2) # accountStorage = MemberHistDB(db) confStorage = ConfigurationDB(db2) transactionStorage = TransactionMemoDB(db2) transferMemosStorage = TransferMemoDB(db2) accountStorage = AccountsDB(db2) accounts = accountStorage.get() other_accounts = accountStorage.get_transfer() conf_setup = confStorage.get() last_cycle = conf_setup["last_cycle"] share_cycle_min = conf_setup["share_cycle_min"] sp_share_ratio = conf_setup["sp_share_ratio"] rshares_per_cycle = conf_setup["rshares_per_cycle"] del_rshares_per_cycle = conf_setup["del_rshares_per_cycle"] upvote_multiplier = conf_setup["upvote_multiplier"] last_paid_post = conf_setup["last_paid_post"] last_paid_comment = conf_setup["last_paid_comment"] last_delegation_check = conf_setup["last_delegation_check"] minimum_vote_threshold = conf_setup["minimum_vote_threshold"]
raise Exception("config.json is missing") else: with open(config_file) as json_data_file: config_data = json.load(json_data_file) # print(config_data) databaseConnector = config_data["databaseConnector"] databaseConnector2 = config_data["databaseConnector2"] start_prep_time = time.time() db = dataset.connect(databaseConnector) db2 = dataset.connect(databaseConnector2) # Create keyStorage trxStorage = TrxDB(db2) memberStorage = MemberDB(db2) confStorage = ConfigurationDB(db2) accStorage = AccountsDB(db2) keyStorage = KeysDB(db2) accounts = accStorage.get() conf_setup = confStorage.get() last_cycle = conf_setup["last_cycle"] share_cycle_min = conf_setup["share_cycle_min"] sp_share_ratio = conf_setup["sp_share_ratio"] rshares_per_cycle = conf_setup["rshares_per_cycle"] minimum_vote_threshold = conf_setup["minimum_vote_threshold"] comment_vote_divider = conf_setup["comment_vote_divider"] comment_vote_timeout_h = conf_setup["comment_vote_timeout_h"] member_accounts = memberStorage.get_all_accounts()
with open(config_file) as json_data_file: config_data = json.load(json_data_file) # print(config_data) databaseConnector = config_data["databaseConnector"] databaseConnector2 = config_data["databaseConnector2"] hive_blockchain = config_data["hive_blockchain"] start_prep_time = time.time() db = dataset.connect(databaseConnector) db2 = dataset.connect(databaseConnector2) # Create keyStorage trxStorage = TrxDB(db2) memberStorage = MemberDB(db2) confStorage = ConfigurationDB(db2) blacklistStorage = BlacklistDB(db2) accStorage = AccountsDB(db2) keyStorage = KeysDB(db2) accounts = accStorage.get() other_accounts = accStorage.get_transfer() blacklist = blacklistStorage.get() blacklist_tags = [] for t in blacklist["tags"].split(","): blacklist_tags.append(t.strip()) blacklist_apps = [] for t in blacklist["apps"].split(","): blacklist_apps.append(t.strip())