-
Notifications
You must be signed in to change notification settings - Fork 783
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
Conversation
b5e9960
to
30eec59
Compare
There was a problem hiding this 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", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 }) |
There was a problem hiding this comment.
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.
30eec59
to
813b10e
Compare
Rebased this, I would then merge if checks pass. |
…VM with Blockchain instance as default
813b10e
to
b5ca279
Compare
Rebased this. |
@s1na Can you re-approve here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
See #446 for follow-up on discussion, also part of #449 and #455.