Beispiel #1
0
def test_get_fork_version(previous_version, current_version, epoch,
                          current_epoch, expected):
    fork = Fork(
        previous_version=previous_version,
        current_version=current_version,
        epoch=epoch,
    )
    assert expected == get_fork_version(
        fork,
        current_epoch,
    )
Beispiel #2
0
def test_get_fork_version(previous_version, current_version, slot,
                          current_slot, expected):
    fork = Fork(
        previous_version=previous_version,
        current_version=current_version,
        slot=slot,
    )
    assert expected == get_fork_version(
        fork,
        current_slot,
    )
Beispiel #3
0
def test_get_fork_version(pre_fork_version,
                          post_fork_version,
                          fork_slot,
                          current_slot,
                          expected):
    fork_data = ForkData(
        pre_fork_version=pre_fork_version,
        post_fork_version=post_fork_version,
        fork_slot=fork_slot,
    )
    assert expected == get_fork_version(
        fork_data,
        current_slot,
    )