Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
c00a995d
Commit
c00a995d
authored
May 19, 2016
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove tx from traceManager
parent
ecbfbf1b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
13 deletions
+10
-13
.gitignore
.gitignore
+1
-0
debugger.js
src/debugger.js
+0
-1
storagePanel.js
src/storagePanel.js
+3
-2
traceManager.js
src/traceManager.js
+6
-10
No files found.
.gitignore
View file @
c00a995d
...
@@ -2,3 +2,4 @@ build
...
@@ -2,3 +2,4 @@ build
node_modules
node_modules
npm-debug.log
npm-debug.log
lint.xml
lint.xml
.vscode
src/debugger.js
View file @
c00a995d
...
@@ -57,7 +57,6 @@ module.exports = React.createClass({
...
@@ -57,7 +57,6 @@ module.exports = React.createClass({
this
.
setState
({
this
.
setState
({
tx
:
tx
tx
:
tx
})
})
traceManager
.
setTransaction
(
tx
)
var
self
=
this
var
self
=
this
traceManager
.
resolveTrace
(
blockNumber
,
txIndex
,
function
(
success
)
{
traceManager
.
resolveTrace
(
blockNumber
,
txIndex
,
function
(
success
)
{
console
.
log
(
'trace loaded '
+
success
)
console
.
log
(
'trace loaded '
+
success
)
...
...
src/storagePanel.js
View file @
c00a995d
...
@@ -4,7 +4,8 @@ var BasicPanel = require('./basicPanel')
...
@@ -4,7 +4,8 @@ var BasicPanel = require('./basicPanel')
module
.
exports
=
React
.
createClass
({
module
.
exports
=
React
.
createClass
({
contextTypes
:
{
contextTypes
:
{
traceManager
:
React
.
PropTypes
.
object
traceManager
:
React
.
PropTypes
.
object
,
tx
:
React
.
PropTypes
.
object
},
},
getDefaultProps
:
function
()
{
getDefaultProps
:
function
()
{
...
@@ -30,7 +31,7 @@ module.exports = React.createClass({
...
@@ -30,7 +31,7 @@ module.exports = React.createClass({
if
(
window
.
ethDebuggerSelectedItem
!==
nextProps
.
currentStepIndex
)
return
if
(
window
.
ethDebuggerSelectedItem
!==
nextProps
.
currentStepIndex
)
return
var
self
=
this
var
self
=
this
this
.
context
.
traceManager
.
getStorageAt
(
nextProps
.
currentStepIndex
,
function
(
storage
)
{
this
.
context
.
traceManager
.
getStorageAt
(
nextProps
.
currentStepIndex
,
this
.
context
.
tx
.
blockNumber
.
toString
(),
this
.
context
.
tx
.
transactionIndex
,
function
(
storage
)
{
if
(
window
.
ethDebuggerSelectedItem
===
nextProps
.
currentStepIndex
)
{
if
(
window
.
ethDebuggerSelectedItem
===
nextProps
.
currentStepIndex
)
{
self
.
setState
({
self
.
setState
({
data
:
storage
data
:
storage
...
...
src/traceManager.js
View file @
c00a995d
...
@@ -22,10 +22,6 @@ module.exports = {
...
@@ -22,10 +22,6 @@ module.exports = {
this
.
web3
=
web3
this
.
web3
=
web3
},
},
setTransaction
:
function
(
tx
)
{
this
.
transaction
=
tx
},
resolveTrace
:
function
(
blockNumber
,
txNumber
,
callback
)
{
resolveTrace
:
function
(
blockNumber
,
txNumber
,
callback
)
{
this
.
isLoading
=
true
this
.
isLoading
=
true
this
.
init
()
this
.
init
()
...
@@ -144,7 +140,7 @@ module.exports = {
...
@@ -144,7 +140,7 @@ module.exports = {
callback
(
this
.
trace
.
length
)
callback
(
this
.
trace
.
length
)
},
},
getStorageAt
:
function
(
stepIndex
,
callback
)
{
getStorageAt
:
function
(
stepIndex
,
blockNumber
,
txIndex
,
callback
)
{
var
stoChange
=
this
.
findLowerBound
(
stepIndex
,
this
.
vmTraceChangesRef
)
var
stoChange
=
this
.
findLowerBound
(
stepIndex
,
this
.
vmTraceChangesRef
)
if
(
!
stoChange
)
{
if
(
!
stoChange
)
{
return
{}
return
{}
...
@@ -153,7 +149,7 @@ module.exports = {
...
@@ -153,7 +149,7 @@ module.exports = {
var
changeRefs
=
this
.
vmTraceIndexByStorageChange
[
stoChange
]
var
changeRefs
=
this
.
vmTraceIndexByStorageChange
[
stoChange
]
var
address
=
this
.
storageChanges
[
changeRefs
.
context
].
address
var
address
=
this
.
storageChanges
[
changeRefs
.
context
].
address
var
self
=
this
var
self
=
this
this
.
retrieveStorage
(
address
,
function
(
storage
)
{
this
.
retrieveStorage
(
address
,
blockNumber
,
txIndex
,
function
(
storage
)
{
for
(
var
k
=
0
;
k
<
changeRefs
.
context
;
k
++
)
{
for
(
var
k
=
0
;
k
<
changeRefs
.
context
;
k
++
)
{
var
context
=
self
.
storageChanges
[
k
]
var
context
=
self
.
storageChanges
[
k
]
if
(
context
.
address
===
address
)
{
if
(
context
.
address
===
address
)
{
...
@@ -319,13 +315,13 @@ module.exports = {
...
@@ -319,13 +315,13 @@ module.exports = {
},
},
// retrieve the storage of an account just after the execution of tx
// retrieve the storage of an account just after the execution of tx
retrieveStorage
:
function
(
address
,
callBack
)
{
retrieveStorage
:
function
(
address
,
blockNumber
,
txIndex
,
callBack
)
{
if
(
this
.
storages
[
address
])
{
if
(
this
.
storages
[
address
])
{
callBack
(
this
.
storages
[
address
])
callBack
(
this
.
storages
[
address
])
}
}
var
self
=
this
var
self
=
this
if
(
this
.
transaction
)
{
if
(
blockNumber
!==
null
&&
txIndex
!==
null
)
{
this
.
web3
.
debug
.
storageAt
(
this
.
transaction
.
blockNumber
.
toString
(),
this
.
transaction
.
transaction
Index
,
address
,
function
(
error
,
result
)
{
this
.
web3
.
debug
.
storageAt
(
blockNumber
,
tx
Index
,
address
,
function
(
error
,
result
)
{
if
(
error
)
{
if
(
error
)
{
console
.
log
(
error
)
console
.
log
(
error
)
}
else
{
}
else
{
...
@@ -334,7 +330,7 @@ module.exports = {
...
@@ -334,7 +330,7 @@ module.exports = {
}
}
})
})
}
else
{
}
else
{
console
.
log
(
'
transaction is
not defined'
)
console
.
log
(
'
blockNumber/txIndex are
not defined'
)
}
}
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment