Skip to content

Commit

Permalink
Pass Common when copying the VM
Browse files Browse the repository at this point in the history
  • Loading branch information
alcuadrado committed May 28, 2019
1 parent ee3efa0 commit 7c5a653
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,10 @@ export default class VM extends AsyncEventEmitter {
* Returns a copy of the [[VM]] instance.
*/
copy(): VM {
const hardfork = this._common.hardfork()

return new VM({
stateManager: this.stateManager.copy(),
blockchain: this.blockchain,
chain: this._common.chainName(),
hardfork: hardfork !== null ? hardfork : undefined,
common: this._common
})
}

Expand Down

0 comments on commit 7c5a653

Please sign in to comment.