def test_random_high_inactivity_scores(spec, state):
    randomize_inactivity_scores(spec,
                                state,
                                minimum=500000,
                                maximum=5000000,
                                rng=Random(9998))
    yield from rewards_helpers.run_test_full_random(spec,
                                                    state,
                                                    rng=Random(9998))
def test_half_zero_half_random_inactivity_scores(spec, state):
    randomize_inactivity_scores(spec, state, rng=Random(10101))
    half_val_point = len(state.validators) // 2
    state.inactivity_scores = [
        0
    ] * half_val_point + state.inactivity_scores[half_val_point:]

    yield from rewards_helpers.run_test_full_random(spec,
                                                    state,
                                                    rng=Random(10101))
def test_full_random_misc_balances(spec, state):
    yield from rewards_helpers.run_test_full_random(spec, state)
def test_full_random_3(spec, state):
    yield from rewards_helpers.run_test_full_random(spec,
                                                    state,
                                                    rng=Random(4040))
示例#5
0
def test_full_random_ten_epoch_leak(spec, state):
    yield from rewards_helpers.run_test_full_random(spec, state)
def test_random_inactivity_scores_leaking_0(spec, state):
    randomize_inactivity_scores(spec, state, rng=Random(9999))
    yield from rewards_helpers.run_test_full_random(spec,
                                                    state,
                                                    rng=Random(9999))
def test_full_random_misc_balances(spec, state):
    randomize_inactivity_scores(spec, state, rng=Random(33333))
    yield from rewards_helpers.run_test_full_random(spec, state)
def test_random_inactivity_scores_low_balances_1(spec, state):
    randomize_inactivity_scores(spec, state, rng=Random(22222))
    yield from rewards_helpers.run_test_full_random(spec, state)
示例#9
0
def test_full_random_low_balances_1(spec, state):
    yield from rewards_helpers.run_test_full_random(spec,
                                                    state,
                                                    rng=Random(6060))