From 7c5a6535a360f01ceb9bdb2f53dca76d1f616814 Mon Sep 17 00:00:00 2001 From: Patricio Palladino Date: Tue, 28 May 2019 11:09:49 -0300 Subject: [PATCH] Pass Common when copying the VM --- lib/index.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/index.ts b/lib/index.ts index 917681fb5f8..93ae369cd58 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -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 }) }