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

Add AppEngine.ValidateCallFlags to be callable by subclasses #1784

Merged
merged 3 commits into from
Jul 22, 2020
Merged

Add AppEngine.ValidateCallFlags to be callable by subclasses #1784

merged 3 commits into from
Jul 22, 2020

Conversation

devhawk
Copy link
Contributor

@devhawk devhawk commented Jul 21, 2020

No description provided.

devhawk added 2 commits July 20, 2020 19:18
separate call flag validation into separate function so it can be called by ApplicationEngine subclasses. This is needed for the debugger, which overrides a few of the standard service implementations
@shargon
Copy link
Member

shargon commented Jul 22, 2020

@devhawk the code looks good, but could you add some background about why it's needed?

@devhawk
Copy link
Contributor Author

devhawk commented Jul 22, 2020

I just realized I should have made ApplicationEngine.AddGas protected internal as part of #1785. I've added it to this PR.

@devhawk
Copy link
Contributor Author

devhawk commented Jul 22, 2020

@devhawk the code looks good, but could you add some background about why it's needed?

This PR provides a mechanism for ApplicationEngine subclases to validate call flags of a sys call. The debugger overrides ApplicationEngine.OnSysCall to replace or augment the behavior of several services. For example, the debugger user can specify what they want the result of Runtime.CheckWitness to be.

@shargon shargon merged commit 13f303d into neo-project:preview3 Jul 22, 2020
@devhawk devhawk deleted the devhawk/ValidateCallFlags branch July 23, 2020 20:15
erikzhang added a commit that referenced this pull request Aug 5, 2020
* Classes related to Neo.SmartContract types should not be internal (#1785)

* Classes related to Neo.SmartContract types should not be internal
Fixes #1782

* public callbacks + protected internal service methods

* Add AsReadOnly()

Co-authored-by: Harry Pierson <[email protected]>
Co-authored-by: Shargon <[email protected]>

* Add AppEngine.ValidateCallFlags to be callable by subclasses (#1784)

* Update ApplicationEngine.cs

separate call flag validation into separate function so it can be called by ApplicationEngine subclasses. This is needed for the debugger, which overrides a few of the standard service implementations

* fix whitespace

* protected internal addGas

Co-authored-by: Harry Pierson <[email protected]>

* Fix vote (#1792)

* fix vote

* add ut

* throw exception

* fix

* fix ut

Co-authored-by: Tommo-L <[email protected]>
Co-authored-by: erikzhang <[email protected]>

* preview3

* Update dependency

Co-authored-by: Harry Pierson <[email protected]>
Co-authored-by: Harry Pierson <[email protected]>
Co-authored-by: Shargon <[email protected]>
Co-authored-by: Luchuan <[email protected]>
Co-authored-by: Tommo-L <[email protected]>
cloud8little pushed a commit to cloud8little/neo that referenced this pull request Jan 24, 2021
* Classes related to Neo.SmartContract types should not be internal (neo-project#1785)

* Classes related to Neo.SmartContract types should not be internal
Fixes neo-project#1782

* public callbacks + protected internal service methods

* Add AsReadOnly()

Co-authored-by: Harry Pierson <[email protected]>
Co-authored-by: Shargon <[email protected]>

* Add AppEngine.ValidateCallFlags to be callable by subclasses (neo-project#1784)

* Update ApplicationEngine.cs

separate call flag validation into separate function so it can be called by ApplicationEngine subclasses. This is needed for the debugger, which overrides a few of the standard service implementations

* fix whitespace

* protected internal addGas

Co-authored-by: Harry Pierson <[email protected]>

* Fix vote (neo-project#1792)

* fix vote

* add ut

* throw exception

* fix

* fix ut

Co-authored-by: Tommo-L <[email protected]>
Co-authored-by: erikzhang <[email protected]>

* preview3

* Update dependency

Co-authored-by: Harry Pierson <[email protected]>
Co-authored-by: Harry Pierson <[email protected]>
Co-authored-by: Shargon <[email protected]>
Co-authored-by: Luchuan <[email protected]>
Co-authored-by: Tommo-L <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants