From 50a264f77ae5a44f78b70ea025d6db61b2b3d058 Mon Sep 17 00:00:00 2001 From: Oren Date: Wed, 4 Sep 2024 13:51:51 +0300 Subject: [PATCH] added warning comment on detection index --- x/conflict/keeper/msg_server_detection.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/x/conflict/keeper/msg_server_detection.go b/x/conflict/keeper/msg_server_detection.go index ea1e30fe53..509fece136 100644 --- a/x/conflict/keeper/msg_server_detection.go +++ b/x/conflict/keeper/msg_server_detection.go @@ -14,6 +14,8 @@ import ( "golang.org/x/exp/slices" ) +// DetectionIndex creates an index for detection instances. +// WARNING: the detection index should not be used for prefixed iteration. func DetectionIndex(creatorAddr string, conflict *types.ResponseConflict, epochStart uint64) string { if conflict.IsDataNil() { return ""