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
dadf01de
Commit
dadf01de
authored
May 15, 2015
by
Gustav Simonsson
Browse files
Options
Downloads
Patches
Plain Diff
unskip StateTests/stTransactionTest and use test tx nonce
parent
c1f0d40e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/helper/vm.go
+6
-4
6 additions, 4 deletions
tests/helper/vm.go
tests/vm/gh_test.go
+0
-1
0 additions, 1 deletion
tests/vm/gh_test.go
with
6 additions
and
5 deletions
tests/helper/vm.go
+
6
−
4
View file @
dadf01de
...
@@ -163,6 +163,7 @@ func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, state.
...
@@ -163,6 +163,7 @@ func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, state.
gas
=
common
.
Big
(
tx
[
"gasLimit"
])
gas
=
common
.
Big
(
tx
[
"gasLimit"
])
price
=
common
.
Big
(
tx
[
"gasPrice"
])
price
=
common
.
Big
(
tx
[
"gasPrice"
])
value
=
common
.
Big
(
tx
[
"value"
])
value
=
common
.
Big
(
tx
[
"value"
])
nonce
=
common
.
Big
(
tx
[
"nonce"
])
.
Uint64
()
caddr
=
common
.
HexToAddress
(
env
[
"currentCoinbase"
])
caddr
=
common
.
HexToAddress
(
env
[
"currentCoinbase"
])
)
)
...
@@ -178,7 +179,7 @@ func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, state.
...
@@ -178,7 +179,7 @@ func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, state.
coinbase
:=
statedb
.
GetOrNewStateObject
(
caddr
)
coinbase
:=
statedb
.
GetOrNewStateObject
(
caddr
)
coinbase
.
SetGasPool
(
common
.
Big
(
env
[
"currentGasLimit"
]))
coinbase
.
SetGasPool
(
common
.
Big
(
env
[
"currentGasLimit"
]))
message
:=
NewMessage
(
common
.
BytesToAddress
(
keyPair
.
Address
()),
to
,
data
,
value
,
gas
,
price
)
message
:=
NewMessage
(
common
.
BytesToAddress
(
keyPair
.
Address
()),
to
,
data
,
value
,
gas
,
price
,
nonce
)
vmenv
:=
NewEnvFromMap
(
statedb
,
env
,
tx
)
vmenv
:=
NewEnvFromMap
(
statedb
,
env
,
tx
)
vmenv
.
origin
=
common
.
BytesToAddress
(
keyPair
.
Address
())
vmenv
.
origin
=
common
.
BytesToAddress
(
keyPair
.
Address
())
ret
,
_
,
err
:=
core
.
ApplyMessage
(
vmenv
,
message
,
coinbase
)
ret
,
_
,
err
:=
core
.
ApplyMessage
(
vmenv
,
message
,
coinbase
)
...
@@ -195,10 +196,11 @@ type Message struct {
...
@@ -195,10 +196,11 @@ type Message struct {
to
*
common
.
Address
to
*
common
.
Address
value
,
gas
,
price
*
big
.
Int
value
,
gas
,
price
*
big
.
Int
data
[]
byte
data
[]
byte
nonce
uint64
}
}
func
NewMessage
(
from
common
.
Address
,
to
*
common
.
Address
,
data
[]
byte
,
value
,
gas
,
price
*
big
.
Int
)
Message
{
func
NewMessage
(
from
common
.
Address
,
to
*
common
.
Address
,
data
[]
byte
,
value
,
gas
,
price
*
big
.
Int
,
nonce
uint64
)
Message
{
return
Message
{
from
,
to
,
value
,
gas
,
price
,
data
}
return
Message
{
from
,
to
,
value
,
gas
,
price
,
data
,
nonce
}
}
}
func
(
self
Message
)
Hash
()
[]
byte
{
return
nil
}
func
(
self
Message
)
Hash
()
[]
byte
{
return
nil
}
...
@@ -207,5 +209,5 @@ func (self Message) To() *common.Address { return self.to }
...
@@ -207,5 +209,5 @@ func (self Message) To() *common.Address { return self.to }
func
(
self
Message
)
GasPrice
()
*
big
.
Int
{
return
self
.
price
}
func
(
self
Message
)
GasPrice
()
*
big
.
Int
{
return
self
.
price
}
func
(
self
Message
)
Gas
()
*
big
.
Int
{
return
self
.
gas
}
func
(
self
Message
)
Gas
()
*
big
.
Int
{
return
self
.
gas
}
func
(
self
Message
)
Value
()
*
big
.
Int
{
return
self
.
value
}
func
(
self
Message
)
Value
()
*
big
.
Int
{
return
self
.
value
}
func
(
self
Message
)
Nonce
()
uint64
{
return
0
}
func
(
self
Message
)
Nonce
()
uint64
{
return
self
.
nonce
}
func
(
self
Message
)
Data
()
[]
byte
{
return
self
.
data
}
func
(
self
Message
)
Data
()
[]
byte
{
return
self
.
data
}
This diff is collapsed.
Click to expand it.
tests/vm/gh_test.go
+
0
−
1
View file @
dadf01de
...
@@ -320,7 +320,6 @@ func TestStateLog(t *testing.T) {
...
@@ -320,7 +320,6 @@ func TestStateLog(t *testing.T) {
}
}
func
TestStateTransaction
(
t
*
testing
.
T
)
{
func
TestStateTransaction
(
t
*
testing
.
T
)
{
t
.
Skip
()
const
fn
=
"../files/StateTests/stTransactionTest.json"
const
fn
=
"../files/StateTests/stTransactionTest.json"
RunVmTest
(
fn
,
t
)
RunVmTest
(
fn
,
t
)
}
}
...
...
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