Skip to content

Commit 68daddb

Browse files
committed
fix: enum bound check in GetSimulatedErrorRate
1 parent 75fd518 commit 68daddb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/llmq/dkgsession.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void SetSimulatedDKGErrorRate(DKGError::type type, double rate)
4747

4848
double GetSimulatedErrorRate(DKGError::type type)
4949
{
50-
if (std23::to_underlying(type) >= DKGError::type::_COUNT) return 0;
50+
if (type >= DKGError::type::_COUNT) return 0;
5151
return simDkgErrorMap[std23::to_underlying(type)];
5252
}
5353

0 commit comments

Comments
 (0)