"main_post"] == 0 and rshares < minimum_vote_threshold * 2:
            continue
        try:
            c = Comment(authorperm, steem_instance=stm)
        except:
            continue
        main_post = c.is_main_post()
        already_voted = False
        if c.time_elapsed() > timedelta(hours=156):
            continue

        for v in c["active_votes"]:
            if v["voter"] in accounts:
                already_voted = True
        if already_voted:
            postTrx.update_voted(author, created, already_voted)
            continue
        vote_delay_sec = 15 * 60
        if member["upvote_delay"] is not None:
            vote_delay_sec = member["upvote_delay"]
        if c.time_elapsed() < timedelta(seconds=vote_delay_sec):
            continue

        if post_list[authorperm]["main_post"] == 0:
            highest_pct = 0
            highest_rshares = 0
            voter = None
            current_mana = {}
            if rshares > minimum_vote_threshold * 20:
                rshares = int(minimum_vote_threshold * 20)
            for acc in voter_accounts:
            if v["voter"] in accounts:
                already_voted = True
                try:
                    if "time" in v:
                        voted_after = (v["time"] -
                                       c["created"]).total_seconds()
                    elif "last_update" in v:
                        voted_after = (v["last_update"] -
                                       c["created"]).total_seconds()
                    else:
                        voted_after = 300

                except:
                    voted_after = 300
        if already_voted:
            postTrx.update_voted(author, created, already_voted, voted_after)
            continue
        vote_delay_sec = 5 * 60
        if member["upvote_delay"] is not None:
            vote_delay_sec = member["upvote_delay"]
        if c.time_elapsed() < timedelta(seconds=(vote_delay_sec -
                                                 upvote_delay_correction)):
            continue
        if member["last_received_vote"] is not None and (datetime.utcnow(
        ) - member["last_received_vote"]).total_seconds() / 60 < 15:
            continue

        if post_list[authorperm]["main_post"] == 0:
            highest_pct = 0
            highest_rshares = 0
            voter = None