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

Function TestCalculateBlocksDiff_Cap14400

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

Source from the content-addressed store, hash-verified

122}
123
124func TestCalculateBlocksDiff_Cap14400(t *testing.T) {
125 params := defaultTestParams()
126 params.EpochBlocksBackoffPercent = 50 // 50%, base = 1.5
127
128 // steps=20 → floor(10 * 1.5^20) = floor(33252.5...) → capped at 14400
129 result := calculateBlocksDiff(params, 9300)
130 require.Equal(t, int64(14400), result)
131}
132
133func TestCalculateBlocksDiff_NoOverflowPanic(t *testing.T) {
134 // Ensure no panic with extreme parameters that would cause

Callers

nothing calls this directly

Calls 2

defaultTestParamsFunction · 0.85
calculateBlocksDiffFunction · 0.85

Tested by

no test coverage detected