def init_environment():
    """
    This runs before every test
    """

    global backend
    global proof
    global changed_interlink_proof
    global missing_blocks_proof
    global replaced_blocks_proof
    backend = "ganache"
    proof = Proof()
    changed_interlink_proof = Proof()
    missing_blocks_proof = Proof()
    replaced_blocks_proof = Proof()

    original_proof = ProofTool("../data/proofs/").fetch_proof(100)
    proof.set(original_proof)

    _changed_interlink_proof = change_interlink_hash(
        original_proof, int(changed_interlink_proof.size / 2))
    changed_interlink_proof.set(_changed_interlink_proof)

    _missing_blocks_proof = original_proof.copy()
    _missing_blocks_proof = skip_blocks(_missing_blocks_proof, -3)
    missing_blocks_proof.set(_missing_blocks_proof)

    _pt = ProofTool()
    _replaced_blocks_proof = _pt.fetch_proof(
        "../data/proofs/proof_100_replaced_mid_block.pkl")
    replaced_blocks_proof.set(_replaced_blocks_proof)
def init_environment():
    """
    This runs before every test
    """

    backend = "ganache"
    global interface
    interface = make_interface(backend)

    global proof
    global headless_proof
    proof = Proof()
    headless_proof = Proof()

    original_proof = ProofTool("../data/proofs/").fetch_proof(100)
    proof.set(original_proof)

    _headless_proof = original_proof.copy()
    remove_genesis(_headless_proof)
    headless_proof.set(_headless_proof)