def main():
    badger = connect_badger(badger_config.prod_json,
                            load_keeper=True,
                            load_guardian=True)
    (currentRewards, startBlock, endBlock) = calc_next_cycle_range(badger)

    # If sufficient time has passed since last root proposal, propose a new root
    rootProposed = run_action(
        badger,
        {
            "action": "rootUpdater",
            "startBlock": startBlock,
            "endBlock": endBlock,
            "pastRewards": currentRewards,
        },
        test=False,
    )

    time.sleep(45)

    rootApproved = run_action(
        badger,
        {
            "action": "guardian",
            "startBlock": startBlock,
            "endBlock": endBlock,
            "pastRewards": currentRewards,
        },
        test=False,
    )
Beispiel #2
0
def main():
    badger = connect_badger(badger_config.prod_json, load_keeper=True)
    (startBlock, endBlock) = calc_next_cycle_range(badger)

    # If sufficient time has passed since last root proposal, propose a new root
    rootProposed = run_action(
        badger,
        {"action": "rootUpdater", "startBlock": startBlock, "endBlock": endBlock},
        test=False,
    )
Beispiel #3
0
def propose_root(badger: BadgerSystem):
    (currentRewards, startBlock, endBlock) = calc_next_cycle_range(badger)

    # If sufficient time has passed since last root proposal, propose a new root
    rootProposed = run_action(
        badger,
        {
            "action": "rootUpdater",
            "startBlock": startBlock,
            "endBlock": endBlock,
            "pastRewards": currentRewards,
        },
        test=False,
    )
def main():
    badger = connect_badger()
    (currentRewards, startBlock, endBlock) = calc_next_cycle_range(badger)

    # If sufficient time has passed since last root proposal, propose a new root
    rootProposed = run_action(
        badger,
        {
            "action": "rootUpdater",
            "startBlock": startBlock,
            "endBlock": endBlock,
            "pastRewards": currentRewards,
        },
        test=True,
    )