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

Introduce virtual operation. #45

Merged
merged 2 commits into from
Sep 25, 2019

Conversation

AbdelStark
Copy link
Contributor

PR description

Introduce VirtualOperation.

  • add isVirtualOperation method to Operation interface: determines whether or not the operation has been virtually added to the contract code.
  • default implementation of isVirtualOperation returns false
  • create VirtualOperation that wraps a real Operation and returns true for isVirtualOperation method.
  • change constructor of EVM to pass a GasCalculator used to create the endOfScriptStop and invalidOperation fields.
  • change visibility of EVM.operationAtOffset to package for testing purpose. (add VisibleForTesting annotation)
  • create EVMTest to test operationAtOffset method .

Fixed Issue(s)

EdJoJob and others added 2 commits September 24, 2019 09:02
Signed-off-by: Edward Evans <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
- add `isVirtualOperation` method to `Operation` interface: determines whether or not the operation has been virtually added to the contract code.
- default implementation of `isVirtualOperation` returns `false`
- create `VirtualOperation` that wraps a real `Operation` and returns `true` for `isVirtualOperation` method.
- change `constructor` of `EVM` to pass a `GasCalculator` used to create the `endOfScriptStop` and `invalidOperation` fields.
- change visibility of `EVM.operationAtOffset` to `package` for testing purpose. (add `VisibleForTesting` annotation)
- create `EVMTest` to test `operationAtOffset` method .

Signed-off-by: Abdelhamid Bakhta <[email protected]>
@AbdelStark AbdelStark added the enhancement New feature or request label Sep 24, 2019
@AbdelStark AbdelStark changed the title Feature/virtual operation Introduce virtual operation. Sep 24, 2019
Copy link
Contributor

@mbaxter mbaxter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM pending removal of the extraneous commit!

@@ -1,2 +1,2 @@
org.gradle.jvmargs=-Xmx1g
version=1.2.4
version=1.2.5-SNAPSHOT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you have an extra commit here from Ed - can you remove this commit from your branch history?

@AbdelStark AbdelStark merged commit 8acd5d6 into hyperledger:master Sep 25, 2019
@AbdelStark AbdelStark deleted the feature/virtual-operation branch September 25, 2019 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants