diff --git a/audit/audit_contract.go b/audit/audit_contract.go index 12695d1..400c692 100644 --- a/audit/audit_contract.go +++ b/audit/audit_contract.go @@ -112,7 +112,8 @@ func List() [][]byte { func ListByEpoch(epoch int) [][]byte { ctx := storage.GetReadOnlyContext() - it := storage.Find(ctx, epoch, storage.KeysOnly) + var buf interface{} = epoch + it := storage.Find(ctx, buf.([]byte), storage.KeysOnly) return list(it) } diff --git a/reputation/reputation_contract.go b/reputation/reputation_contract.go index ed6362c..e4640fa 100644 --- a/reputation/reputation_contract.go +++ b/reputation/reputation_contract.go @@ -78,7 +78,8 @@ func GetByID(id []byte) [][]byte { // via GetByID method. func ListByEpoch(epoch int) [][]byte { ctx := storage.GetReadOnlyContext() - it := storage.Find(ctx, epoch, storage.KeysOnly) + var buf interface{} = epoch + it := storage.Find(ctx, buf.([]byte), storage.KeysOnly) var result [][]byte