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

Remove fakeBlockchain class and associated tests #466

Merged
merged 1 commit into from
Mar 22, 2019

Conversation

holgerd77
Copy link
Member

See #446 for follow-up on discussion, also part of #449 and #455.

@holgerd77 holgerd77 force-pushed the remove-fake-blockchain branch from b5e9960 to 30eec59 Compare March 6, 2019 14:22
@holgerd77 holgerd77 requested review from s1na and vpulim March 6, 2019 14:37
@coveralls
Copy link

coveralls commented Mar 6, 2019

Coverage Status

Coverage increased (+0.1%) to 95.26% when pulling b5ca279 on remove-fake-blockchain into 3d08c41 on master.

s1na
s1na previously approved these changes Mar 11, 2019
Copy link
Contributor

@s1na s1na left a comment

Choose a reason for hiding this comment

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

Looks good to me, and these parts are probably well covered by the tests, so it should be fine.

@@ -39,6 +39,7 @@
"async-eventemitter": "^0.2.2",
"ethereumjs-account": "^2.0.3",
"ethereumjs-block": "~2.2.0",
"ethereumjs-blockchain": "^3.4.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this have been the reason for using fakeBlockchain? To avoid depending on ethereumjs-blockchain maybe?

Did you face any roadblocks when dropping the fake blockchain?

Copy link
Member Author

Choose a reason for hiding this comment

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

Already wondered if browser compatibility would be the reason for this, maybe we should get some more of the Karma tests running before proceeding here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, better safe than sorry. Will work on the karma tests now.

lib/index.js Outdated
@@ -65,7 +65,7 @@ function VM (opts = {}) {
this.stateManager = new StateManager({ trie, common: this._common })
}

this.blockchain = opts.blockchain || fakeBlockchain
this.blockchain = opts.blockchain || new Blockchain({ common: this._common })
Copy link
Contributor

Choose a reason for hiding this comment

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

Just for clarification: since the db parameter is not provided, Blockchain will create an in-memory leveldb instance to store blocks and their metadata.

@holgerd77
Copy link
Member Author

Rebased this, I would then merge if checks pass.

@holgerd77 holgerd77 force-pushed the remove-fake-blockchain branch from 813b10e to b5ca279 Compare March 22, 2019 10:29
@holgerd77
Copy link
Member Author

Rebased this.

@holgerd77
Copy link
Member Author

@s1na Can you re-approve here?

Copy link
Contributor

@s1na s1na left a comment

Choose a reason for hiding this comment

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

Looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants