Merge pull request #713 from ethereum/fallbacknode

Add debug nodes reference
pull/1/head
yann300 7 years ago committed by GitHub
commit 3cb4aa39b2
  1. 10
      remix-debugger/src/ui/Ethdebugger.js
  2. 1
      remix-debugger/test-browser/test/vmdebugger.js

@ -6,6 +6,8 @@ var TraceManager = remixCore.trace.TraceManager
var VmDebugger = require('./VmDebugger') var VmDebugger = require('./VmDebugger')
var remixLib = require('remix-lib') var remixLib = require('remix-lib')
var global = remixLib.global var global = remixLib.global
var init = remixLib.init
var executionContext = remixLib.execution.executionContext
var EventManager = remixLib.EventManager var EventManager = remixLib.EventManager
var yo = require('yo-yo') var yo = require('yo-yo')
var csjs = require('csjs-inject') var csjs = require('csjs-inject')
@ -97,6 +99,14 @@ Ethdebugger.prototype.switchProvider = function (type) {
console.log('provider ' + type + ' not defined') console.log('provider ' + type + ' not defined')
} else { } else {
global.web3 = obj global.web3 = obj
executionContext.detectNetwork((error, network) => {
if (error || !network) {
global.web3Debug = obj
} else {
var webDebugNode = init.web3DebugNode(network.name)
global.web3Debug = !webDebugNode ? obj : webDebugNode
}
})
self.event.trigger('providerChanged', [type]) self.event.trigger('providerChanged', [type])
} }
}) })

@ -59,7 +59,6 @@ function loadTrace (browser) {
.execute(function () { .execute(function () {
return document.querySelector('#txinfo .dropdownpanel .dropdownrawcontent').innerHTML return document.querySelector('#txinfo .dropdownpanel .dropdownrawcontent').innerHTML
}, [], function (result) { }, [], function (result) {
console.log(result.value)
if (result.value.indexOf('0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51') === -1) { if (result.value.indexOf('0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51') === -1) {
browser.assert.fail(' txinput panel does not contain 0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51 ', 'info about error', '') browser.assert.fail(' txinput panel does not contain 0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51 ', 'info about error', '')
} }

Loading…
Cancel
Save