good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
48fb0c32
Commit
48fb0c32
authored
May 29, 2015
by
Felix Lange
Browse files
Options
Downloads
Patches
Plain Diff
core/vm: check for 'no code' before doing any work
parent
ea2718c9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/vm/vm.go
+5
-5
5 additions, 5 deletions
core/vm/vm.go
with
5 additions
and
5 deletions
core/vm/vm.go
+
5
−
5
View file @
48fb0c32
...
@@ -71,6 +71,11 @@ func (self *Vm) Run(context *Context, callData []byte) (ret []byte, err error) {
...
@@ -71,6 +71,11 @@ func (self *Vm) Run(context *Context, callData []byte) (ret []byte, err error) {
}
}
}
}
// Don't bother with the execution if there's no code.
if
len
(
code
)
==
0
{
return
context
.
Return
(
nil
),
nil
}
var
(
var
(
op
OpCode
op
OpCode
codehash
=
crypto
.
Sha3Hash
(
code
)
codehash
=
crypto
.
Sha3Hash
(
code
)
...
@@ -94,11 +99,6 @@ func (self *Vm) Run(context *Context, callData []byte) (ret []byte, err error) {
...
@@ -94,11 +99,6 @@ func (self *Vm) Run(context *Context, callData []byte) (ret []byte, err error) {
}
}
)
)
// Don't bother with the execution if there's no code.
if
len
(
code
)
==
0
{
return
context
.
Return
(
nil
),
nil
}
for
{
for
{
// The base for all big integer arithmetic
// The base for all big integer arithmetic
base
:=
new
(
big
.
Int
)
base
:=
new
(
big
.
Int
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment