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

Function TestCalculateBlocksDiff_MaxSteps

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

Source from the content-addressed store, hash-verified

192}
193
194func TestCalculateBlocksDiff_MaxSteps(t *testing.T) {
195 // Wide threshold gap: warn=10000, halt=0
196 params := defaultTestParams()
197 params.CircuitBreakerWarnThreshold = 10000
198 params.CircuitBreakerHaltThreshold = 0
199
200 // cr=0 → steps=1000, extreme exponent → must cap at 14400
201 require.NotPanics(t, func() {
202 result := calculateBlocksDiff(params, 0)
203 require.Equal(t, int64(14400), result)
204 })
205}
206
207func TestCalculateBlocksDiff_LargeCRValue(t *testing.T) {
208 // CR clamped to math.MaxUint32 by mintStatusUpdate before calling

Callers

nothing calls this directly

Calls 2

defaultTestParamsFunction · 0.85
calculateBlocksDiffFunction · 0.85

Tested by

no test coverage detected