-
Notifications
You must be signed in to change notification settings - Fork 100
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
add invoked contract #657
add invoked contract #657
Conversation
@superboyiii tested? |
Give me more time. |
@shargon
|
{ | ||
json["diagnostics"] = new JObject() | ||
{ | ||
["invokedcontracts"] = engine.Diagnostic.InvocationTree.GetItems().Distinct().Select(v => (JString)v.ToString()).ToArray() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returns the InvocationTree
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also we can return the storage changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not a simple renaming, but also storing the tree structure into an array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
InvocationTree
seems cannot traverse tree structure outside now. Need some more support.
JObject json = new(); | ||
json["script"] = Convert.ToBase64String(script); | ||
json["state"] = engine.State; | ||
json["gasconsumed"] = engine.GasConsumed.ToString(); | ||
json["exception"] = GetExceptionMessage(engine.FaultException); | ||
if (useDiagnostic) | ||
{ | ||
json["diagnostics"] = new JObject() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, do we need this wrapper structure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we will add more data to it later.
Going back to the #656 (comment) list, can we also add notifications as something always returned for |
@Ashuaidehao |
Test Failed: |
Test Pass
|
* add invoked contract (#657) * add in file copyright (#679) * witness rule support (#676) * Prevent SSRF (#692) * limit free gas (#697) * add log when exception happens under debug mode (#690) * dbft: tune MaxBlock* parameters (#688) * Fix StateAPI.MakeFindStatesParams (#699) * update Console to ConsoleHelper (#682) * refac log (#700) * Make RpcServer.ProcessAsync public to enable better neo express integration (#701) * Limit result stack (#696) * fix MaxBlockSystemFee (#703) * code optimise (#704) * Add oracle global timeout (#698)
Relate #656.