From a4dab3a5ba071bfe37e40fc4847424c4cf9698d1 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Wed, 23 Mar 2022 19:52:59 +0300 Subject: [PATCH] core: adjust error message of native call --- pkg/core/native/interop.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/core/native/interop.go b/pkg/core/native/interop.go index 077a18aab..c97850138 100644 --- a/pkg/core/native/interop.go +++ b/pkg/core/native/interop.go @@ -17,14 +17,15 @@ func Call(ic *interop.Context) error { return fmt.Errorf("native contract of version %d is not active", version) } var c interop.Contract + curr := ic.VM.GetCurrentScriptHash() for _, ctr := range ic.Natives { - if ctr.Metadata().Hash == ic.VM.GetCurrentScriptHash() { + if ctr.Metadata().Hash == curr { c = ctr break } } if c == nil { - return fmt.Errorf("native contract %d not found", version) + return fmt.Errorf("native contract %s (version %d) not found", curr.StringLE(), version) } history := c.Metadata().UpdateHistory if len(history) == 0 {