remove uneeded property

pull/5370/head
yann300 2 years ago
parent 2a62d0884b
commit 7997668f15
  1. 4
      apps/remix-ide/src/blockchain/blockchain.tsx
  2. 5
      libs/remix-lib/src/execution/txRunner.ts
  3. 3
      libs/remix-lib/src/execution/txRunnerVM.ts
  4. 2
      libs/remix-simulator/src/methods/transactions.ts

@ -82,7 +82,7 @@ export class Blockchain extends Plugin {
return this.getProvider() === 'web3' ? this.config.get('settings/personal-mode') : false return this.getProvider() === 'web3' ? this.config.get('settings/personal-mode') : false
} }
}, _ => this.executionContext.web3(), _ => this.executionContext.currentblockGasLimit()) }, _ => this.executionContext.web3(), _ => this.executionContext.currentblockGasLimit())
this.txRunner = new TxRunner(web3Runner, { runAsync: true }) this.txRunner = new TxRunner(web3Runner, {})
this.networkcallid = 0 this.networkcallid = 0
this.networkStatus = { network: { name: ' - ', id: ' - ' } } this.networkStatus = { network: { name: ' - ', id: ' - ' } }
@ -598,7 +598,7 @@ export class Blockchain extends Plugin {
} }
}) })
}) })
this.txRunner = new TxRunner(web3Runner, { runAsync: true }) this.txRunner = new TxRunner(web3Runner, {})
} }
/** /**

@ -14,7 +14,6 @@ export type Transaction = {
export class TxRunner { export class TxRunner {
event event
runAsync
pendingTxs pendingTxs
queusTxs queusTxs
opt opt
@ -24,8 +23,6 @@ export class TxRunner {
this.internalRunner = internalRunner this.internalRunner = internalRunner
this.event = new EventManager() this.event = new EventManager()
this.runAsync = this.opt.runAsync || true // We have to run like this cause the VM Event Manager does not support running multiple txs at the same time.
this.pendingTxs = {} this.pendingTxs = {}
this.queusTxs = [] this.queusTxs = []
} }
@ -44,7 +41,7 @@ export class TxRunner {
} }
function run (self, tx: Transaction, stamp, confirmationCb, gasEstimationForceSend = null, promptCb = null, callback = null) { function run (self, tx: Transaction, stamp, confirmationCb, gasEstimationForceSend = null, promptCb = null, callback = null) {
if (!self.runAsync && Object.keys(self.pendingTxs).length) { if (Object.keys(self.pendingTxs).length) {
return self.queusTxs.push({ tx, stamp, callback }) return self.queusTxs.push({ tx, stamp, callback })
} }
self.pendingTxs[stamp] = tx self.pendingTxs[stamp] = tx

@ -21,7 +21,6 @@ export type VMExecutionCallBack = (error: string | Error, result?: VMexecutionRe
export class TxRunnerVM { export class TxRunnerVM {
event event
blockNumber blockNumber
runAsync
pendingTxs pendingTxs
vmaccounts vmaccounts
queusTxs queusTxs
@ -38,9 +37,7 @@ export class TxRunnerVM {
// has a default for now for backwards compatability // has a default for now for backwards compatability
this.getVMObject = getVMObject this.getVMObject = getVMObject
this.commonContext = this.getVMObject().common this.commonContext = this.getVMObject().common
this.runAsync = true
this.blockNumber = 0 this.blockNumber = 0
this.runAsync = false // We have to run like this cause the VM Event Manager does not support running multiple txs at the same time.
this.pendingTxs = {} this.pendingTxs = {}
this.vmaccounts = vmaccounts this.vmaccounts = vmaccounts
this.queusTxs = [] this.queusTxs = []

@ -56,7 +56,7 @@ export class Transactions {
} }
this.txRunnerVMInstance = new TxRunnerVM(accounts, api, _ => this.vmContext.vmObject()) this.txRunnerVMInstance = new TxRunnerVM(accounts, api, _ => this.vmContext.vmObject())
this.txRunnerInstance = new TxRunner(this.txRunnerVMInstance, { runAsync: false }) this.txRunnerInstance = new TxRunner(this.txRunnerVMInstance, {})
this.txRunnerInstance.vmaccounts = accounts this.txRunnerInstance.vmaccounts = accounts
} }

Loading…
Cancel
Save