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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
bd0c267c
Commit
bd0c267c
authored
10 years ago
by
Jeffrey Wilcke
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup old code
parent
ca1b2a1a
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
vm/context.go
+5
-7
5 additions, 7 deletions
vm/context.go
vm/environment.go
+0
-5
0 additions, 5 deletions
vm/environment.go
vm/vm_debug.go
+2
-2
2 additions, 2 deletions
vm/vm_debug.go
with
7 additions
and
14 deletions
vm/context.go
+
5
−
7
View file @
bd0c267c
...
...
@@ -5,7 +5,6 @@ import (
"math/big"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/state"
)
type
ContextRef
interface
{
...
...
@@ -15,10 +14,9 @@ type ContextRef interface {
}
type
Context
struct
{
caller
ContextRef
object
ContextRef
Code
[]
byte
message
*
state
.
Message
caller
ContextRef
object
ContextRef
Code
[]
byte
Gas
,
UsedGas
,
Price
*
big
.
Int
...
...
@@ -26,8 +24,8 @@ type Context struct {
}
// Create a new context for the given data items
func
NewContext
(
msg
*
state
.
Message
,
caller
ContextRef
,
object
ContextRef
,
code
[]
byte
,
gas
,
price
*
big
.
Int
)
*
Context
{
c
:=
&
Context
{
message
:
msg
,
caller
:
caller
,
object
:
object
,
Code
:
code
,
Args
:
nil
}
func
NewContext
(
caller
ContextRef
,
object
ContextRef
,
code
[]
byte
,
gas
,
price
*
big
.
Int
)
*
Context
{
c
:=
&
Context
{
caller
:
caller
,
object
:
object
,
Code
:
code
,
Args
:
nil
}
// Gas should be a pointer so it can safely be reduced through the run
// This pointer will be off the state transition
...
...
This diff is collapsed.
Click to expand it.
vm/environment.go
+
0
−
5
View file @
bd0c267c
...
...
@@ -30,11 +30,6 @@ type Environment interface {
Create
(
me
ContextRef
,
addr
,
data
[]
byte
,
gas
,
price
,
value
*
big
.
Int
)
([]
byte
,
error
,
ContextRef
)
}
type
Object
interface
{
GetStorage
(
key
*
big
.
Int
)
*
ethutil
.
Value
SetStorage
(
key
*
big
.
Int
,
value
*
ethutil
.
Value
)
}
type
Account
interface
{
SubBalance
(
amount
*
big
.
Int
)
AddBalance
(
amount
*
big
.
Int
)
...
...
This diff is collapsed.
Click to expand it.
vm/vm_debug.go
+
2
−
2
View file @
bd0c267c
...
...
@@ -47,7 +47,7 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price *
Timestamp
:
self
.
env
.
Time
(),
Coinbase
:
self
.
env
.
Coinbase
(),
Number
:
self
.
env
.
BlockNumber
(),
Value
:
value
,
})
context
:=
NewContext
(
msg
,
caller
,
me
,
code
,
gas
,
price
)
context
:=
NewContext
(
caller
,
me
,
code
,
gas
,
price
)
if
self
.
Recoverable
{
// Recover from any require exception
...
...
@@ -617,7 +617,7 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price *
val
,
loc
:=
stack
.
Popn
()
statedb
.
SetState
(
context
.
Address
(),
loc
.
Bytes
(),
val
)
context
.
message
.
AddStorageChange
(
loc
.
Bytes
())
msg
.
AddStorageChange
(
loc
.
Bytes
())
self
.
Printf
(
" {0x%x : 0x%x}"
,
loc
.
Bytes
(),
val
.
Bytes
())
case
JUMP
:
...
...
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