Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
dadf01de
Commit
dadf01de
authored
May 15, 2015
by
Gustav Simonsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unskip StateTests/stTransactionTest and use test tx nonce
parent
c1f0d40e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
vm.go
tests/helper/vm.go
+6
-4
gh_test.go
tests/vm/gh_test.go
+0
-1
No files found.
tests/helper/vm.go
View file @
dadf01de
...
...
@@ -163,6 +163,7 @@ func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, state.
gas
=
common
.
Big
(
tx
[
"gasLimit"
])
price
=
common
.
Big
(
tx
[
"gasPrice"
])
value
=
common
.
Big
(
tx
[
"value"
])
nonce
=
common
.
Big
(
tx
[
"nonce"
])
.
Uint64
()
caddr
=
common
.
HexToAddress
(
env
[
"currentCoinbase"
])
)
...
...
@@ -178,7 +179,7 @@ func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, state.
coinbase
:=
statedb
.
GetOrNewStateObject
(
caddr
)
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
.
origin
=
common
.
BytesToAddress
(
keyPair
.
Address
())
ret
,
_
,
err
:=
core
.
ApplyMessage
(
vmenv
,
message
,
coinbase
)
...
...
@@ -195,10 +196,11 @@ type Message struct {
to
*
common
.
Address
value
,
gas
,
price
*
big
.
Int
data
[]
byte
nonce
uint64
}
func
NewMessage
(
from
common
.
Address
,
to
*
common
.
Address
,
data
[]
byte
,
value
,
gas
,
price
*
big
.
Int
)
Message
{
return
Message
{
from
,
to
,
value
,
gas
,
price
,
data
}
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
,
nonce
}
}
func
(
self
Message
)
Hash
()
[]
byte
{
return
nil
}
...
...
@@ -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
)
Gas
()
*
big
.
Int
{
return
self
.
gas
}
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
}
tests/vm/gh_test.go
View file @
dadf01de
...
...
@@ -320,7 +320,6 @@ func TestStateLog(t *testing.T) {
}
func
TestStateTransaction
(
t
*
testing
.
T
)
{
t
.
Skip
()
const
fn
=
"../files/StateTests/stTransactionTest.json"
RunVmTest
(
fn
,
t
)
}
...
...
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