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
394e0f60
Commit
394e0f60
authored
Oct 31, 2014
by
Felix Lange
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chain, tests/helper, vm: make tests compile
They were broken by
df5603de
, when vm.Log became ethstate.Log.
parent
b95d9e00
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
bloom9_test.go
chain/bloom9_test.go
+4
-2
vm.go
tests/helper/vm.go
+1
-1
vm_test.go
vm/vm_test.go
+1
-1
No files found.
chain/bloom9_test.go
View file @
394e0f60
...
@@ -3,12 +3,14 @@ package chain
...
@@ -3,12 +3,14 @@ package chain
import
(
import
(
"testing"
"testing"
"github.com/ethereum/go-ethereum/
vm
"
"github.com/ethereum/go-ethereum/
state
"
)
)
func
TestBloom9
(
t
*
testing
.
T
)
{
func
TestBloom9
(
t
*
testing
.
T
)
{
testCase
:=
[]
byte
(
"testtest"
)
testCase
:=
[]
byte
(
"testtest"
)
bin
:=
LogsBloom
([]
vm
.
Log
{
vm
.
Log
{
testCase
,
[][]
byte
{[]
byte
(
"hellohello"
)},
nil
}})
.
Bytes
()
bin
:=
LogsBloom
([]
state
.
Log
{
{
testCase
,
[][]
byte
{[]
byte
(
"hellohello"
)},
nil
},
})
.
Bytes
()
res
:=
BloomLookup
(
bin
,
testCase
)
res
:=
BloomLookup
(
bin
,
testCase
)
if
!
res
{
if
!
res
{
...
...
tests/helper/vm.go
View file @
394e0f60
...
@@ -50,7 +50,7 @@ func (self *Env) Difficulty() *big.Int { return self.difficulty }
...
@@ -50,7 +50,7 @@ func (self *Env) Difficulty() *big.Int { return self.difficulty }
func
(
self
*
Env
)
BlockHash
()
[]
byte
{
return
nil
}
func
(
self
*
Env
)
BlockHash
()
[]
byte
{
return
nil
}
func
(
self
*
Env
)
State
()
*
state
.
State
{
return
self
.
state
}
func
(
self
*
Env
)
State
()
*
state
.
State
{
return
self
.
state
}
func
(
self
*
Env
)
GasLimit
()
*
big
.
Int
{
return
self
.
gasLimit
}
func
(
self
*
Env
)
GasLimit
()
*
big
.
Int
{
return
self
.
gasLimit
}
func
(
self
*
Env
)
AddLog
(
vm
.
Log
)
{}
func
(
self
*
Env
)
AddLog
(
state
.
Log
)
{}
func
(
self
*
Env
)
Transfer
(
from
,
to
vm
.
Account
,
amount
*
big
.
Int
)
error
{
func
(
self
*
Env
)
Transfer
(
from
,
to
vm
.
Account
,
amount
*
big
.
Int
)
error
{
return
vm
.
Transfer
(
from
,
to
,
amount
)
return
vm
.
Transfer
(
from
,
to
,
amount
)
}
}
...
...
vm/vm_test.go
View file @
394e0f60
...
@@ -28,7 +28,7 @@ func (TestEnv) Time() int64 { return 0 }
...
@@ -28,7 +28,7 @@ func (TestEnv) Time() int64 { return 0 }
func
(
TestEnv
)
GasLimit
()
*
big
.
Int
{
return
nil
}
func
(
TestEnv
)
GasLimit
()
*
big
.
Int
{
return
nil
}
func
(
TestEnv
)
Difficulty
()
*
big
.
Int
{
return
nil
}
func
(
TestEnv
)
Difficulty
()
*
big
.
Int
{
return
nil
}
func
(
TestEnv
)
Value
()
*
big
.
Int
{
return
nil
}
func
(
TestEnv
)
Value
()
*
big
.
Int
{
return
nil
}
func
(
TestEnv
)
AddLog
(
Log
)
{}
func
(
TestEnv
)
AddLog
(
state
.
Log
)
{}
func
(
TestEnv
)
Transfer
(
from
,
to
Account
,
amount
*
big
.
Int
)
error
{
func
(
TestEnv
)
Transfer
(
from
,
to
Account
,
amount
*
big
.
Int
)
error
{
return
nil
return
nil
...
...
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