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
62ed083f
Commit
62ed083f
authored
Feb 20, 2018
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: remove unnecessary level of depth from runInVm
parent
adfdea8b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
txRunner.js
src/app/execution/txRunner.js
+4
-4
No files found.
src/app/execution/txRunner.js
View file @
62ed083f
...
...
@@ -68,13 +68,16 @@ TxRunner.prototype.execute = function (args, callback) {
if
(
!
executionContext
.
isVM
())
{
self
.
runInNode
(
args
.
from
,
args
.
to
,
data
,
args
.
value
,
args
.
gasLimit
,
args
.
useCall
,
callback
)
}
else
{
try
{
self
.
runInVm
(
args
.
from
,
args
.
to
,
data
,
args
.
value
,
args
.
gasLimit
,
args
.
useCall
,
callback
)
}
catch
(
e
)
{
callback
(
e
,
null
)
}
}
}
TxRunner
.
prototype
.
runInVm
=
function
(
from
,
to
,
data
,
value
,
gasLimit
,
useCall
,
callback
)
{
const
self
=
this
try
{
var
account
=
self
.
vmaccounts
[
from
]
if
(
!
account
)
{
return
callback
(
'Invalid account selected'
)
...
...
@@ -119,9 +122,6 @@ TxRunner.prototype.runInVm = function (from, to, data, value, gasLimit, useCall,
transactionHash
:
ethJSUtil
.
bufferToHex
(
new
Buffer
(
tx
.
hash
()))
})
})
}
catch
(
e
)
{
callback
(
e
,
null
)
}
}
TxRunner
.
prototype
.
runInNode
=
function
(
from
,
to
,
data
,
value
,
gasLimit
,
useCall
,
callback
)
{
...
...
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