Skip to content

Add AppEngine.ValidateCallFlags to be callable by subclasses#1784

Merged
shargon merged 3 commits intoneo-project:preview3from
devhawk:devhawk/ValidateCallFlags
Jul 22, 2020
Merged

Add AppEngine.ValidateCallFlags to be callable by subclasses#1784
shargon merged 3 commits intoneo-project:preview3from
devhawk:devhawk/ValidateCallFlags

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 <harrypierson@ngd.neo.org>
Co-authored-by: Shargon <shargon@gmail.com>

* 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 <harrypierson@ngd.neo.org>

* Fix vote (#1792)

* fix vote

* add ut

* throw exception

* fix

* fix ut

Co-authored-by: Tommo-L <luchuan@neo.org>
Co-authored-by: erikzhang <erik@neo.org>

* preview3

* Update dependency

Co-authored-by: Harry Pierson <harrypierson@hotmail.com>
Co-authored-by: Harry Pierson <harrypierson@ngd.neo.org>
Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Luchuan <luchuan@ngd.neo.org>
Co-authored-by: Tommo-L <luchuan@neo.org>
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 <harrypierson@ngd.neo.org>
Co-authored-by: Shargon <shargon@gmail.com>

* 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 <harrypierson@ngd.neo.org>

* Fix vote (neo-project#1792)

* fix vote

* add ut

* throw exception

* fix

* fix ut

Co-authored-by: Tommo-L <luchuan@neo.org>
Co-authored-by: erikzhang <erik@neo.org>

* preview3

* Update dependency

Co-authored-by: Harry Pierson <harrypierson@hotmail.com>
Co-authored-by: Harry Pierson <harrypierson@ngd.neo.org>
Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Luchuan <luchuan@ngd.neo.org>
Co-authored-by: Tommo-L <luchuan@neo.org>
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