Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

Add PreExecuteInstruction() and PostExecuteInstruction() virtual methods #96

Merged
merged 1 commit into from
Mar 26, 2019

Conversation

erikzhang
Copy link
Member

@erikzhang erikzhang commented Mar 26, 2019

These methods are added for doing some additional verifications in sub class. Such as gas check.

@ixje
Copy link
Contributor

ixje commented Mar 26, 2019

Can you describe the purpose of these new methods? The only opcode that currently doesn't require an ExecutionContext is THROW or is there a discussion for new ones somewhere?

@erikzhang
Copy link
Member Author

You can get the current ExecutionContext via calling ExecutionEngine.CurrentContext.

@ixje
Copy link
Contributor

ixje commented Mar 26, 2019

The updated issue description clarifies.

@shargon
Copy link
Member

shargon commented Mar 26, 2019

Maybe we should return a bool if is valid or we need to throw and exception

@erikzhang
Copy link
Member Author

Just throws exceptions if not valid.

@erikzhang erikzhang merged commit 663e9c8 into master Mar 26, 2019
@erikzhang erikzhang deleted the feature/engine-methods branch March 26, 2019 12:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants