Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CallFlags #1589

Merged
merged 2 commits into from
Apr 20, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/neo/SmartContract/InteropService.Contract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,12 @@ private static bool Contract_CallEx(ApplicationEngine engine)
if (!engine.TryPop(out ReadOnlySpan<byte> contractHash)) return false;
if (!engine.TryPop(out string method)) return false;
if (!engine.TryPop(out Array args)) return false;
if (!engine.TryPop(out int flags)) return false;
if (!engine.TryPop(out int flagsValue)) return false;

if (!Enum.IsDefined(typeof(CallFlags), (CallFlags)flags)) return false;
CallFlags flags = (CallFlags)flagsValue;
if ((flags & ~CallFlags.All) != 0) return false;

return Contract_CallEx(engine, new UInt160(contractHash), method, args, (CallFlags)flags);
return Contract_CallEx(engine, new UInt160(contractHash), method, args, flags);
}

private static bool Contract_CallEx(ApplicationEngine engine, UInt160 contractHash, string method, Array args, CallFlags flags)
Expand Down