diff --git a/src/neo/SmartContract/InteropService.Contract.cs b/src/neo/SmartContract/InteropService.Contract.cs index 99dc91c419..88260a0407 100644 --- a/src/neo/SmartContract/InteropService.Contract.cs +++ b/src/neo/SmartContract/InteropService.Contract.cs @@ -134,6 +134,8 @@ private static bool Contract_CallEx(ApplicationEngine engine) private static bool Contract_CallEx(ApplicationEngine engine, UInt160 contractHash, string method, Array args, CallFlags flags) { + if (method.StartsWith('_')) return false; + ContractState contract = engine.Snapshot.Contracts.TryGet(contractHash); if (contract is null) return false; @@ -174,6 +176,10 @@ private static bool Contract_CallEx(ApplicationEngine engine, UInt160 contractHa context_new.EvaluationStack.Push(args[i]); context_new.InstructionPointer = md.Offset; } + + md = contract.Manifest.Abi.GetMethod("_initialize"); + if (md != null) engine.LoadClonedContext(md.Offset); + return true; }