From 6e72d0b3b4059e4f8556cec754ee423cec537ad9 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Tue, 30 Jan 2024 16:34:40 +0300 Subject: [PATCH] [#75] policy: Fix compiler error Refs #71 Signed-off-by: Evgenii Stratonikov --- policy/policy_contract.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/policy/policy_contract.go b/policy/policy_contract.go index 3a44153..b73b743 100644 --- a/policy/policy_contract.go +++ b/policy/policy_contract.go @@ -211,6 +211,7 @@ func ListChainsByPrefix(entity Kind, entityName string, prefix []byte) [][]byte func IteratorChainsByPrefix(entity Kind, entityName string, prefix []byte) iterator.Iterator { ctx := storage.GetReadOnlyContext() - keyPrefix := storageKey(entity, entityName, prefix) + id, _ := mapToNumeric(ctx, []byte(entityName)) + keyPrefix := storageKey(entity, id, prefix) return storage.Find(ctx, keyPrefix, storage.ValuesOnly) }