MCPcopy Create free account
hub / github.com/akash-network/node / TestCalculateBlocksDiff_StepsTooSmall

Function TestCalculateBlocksDiff_StepsTooSmall

x/bme/keeper/keeper_test.go:43–50  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

41}
42
43func TestCalculateBlocksDiff_StepsTooSmall(t *testing.T) {
44 params := defaultTestParams()
45
46 // CR = 9495: drop = 5, steps = 5/10 = 0 (integer division)
47 require.Equal(t, params.MinEpochBlocks, calculateBlocksDiff(params, 9495))
48 // CR = 9491: drop = 9, steps = 9/10 = 0
49 require.Equal(t, params.MinEpochBlocks, calculateBlocksDiff(params, 9491))
50}
51
52func TestCalculateBlocksDiff_DefaultParams(t *testing.T) {
53 // EpochBlocksBackoffPercent=10 (10%), base = 1.1

Callers

nothing calls this directly

Calls 2

defaultTestParamsFunction · 0.85
calculateBlocksDiffFunction · 0.85

Tested by

no test coverage detected