-
Notifications
You must be signed in to change notification settings - Fork 224
Nullable #946
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
base: master
Are you sure you want to change the base?
Nullable #946
Conversation
| ContractMethodDescriptor md = oracleContract.Manifest.Abi.GetMethod(ContractBasicMethod.Verify, ContractBasicMethod.VerifyPCount)!; | ||
| engine.LoadContract(oracleContract, md, CallFlags.None); | ||
| if (engine.Execute() != VMState.HALT) return null; | ||
| engine.Execute(); //FAULT is impossible |
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.
I think that not checking the execution status is not a good idea; it makes it less resilient to failures
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's impossible to fail.
And, if you return null, it fails here:
| var txSign = responseTx.Sign(account.GetKey(), _system.Settings.Network); |
| private void AddSignItem(Contract contract, KeyPair key) | ||
| { | ||
| if (!Tx.GetScriptHashesForVerifying(null).Contains(contract.ScriptHash)) | ||
| if (!Tx.GetScriptHashesForVerifying(null!).Contains(contract.ScriptHash)) |
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.
Wait for neo-project/neo#4378
Co-authored-by: Shargon <[email protected]>
No description provided.