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
99fa9afa
Commit
99fa9afa
authored
May 25, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated to work with the new config
parent
281559d4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
block_chain_test.go
ethchain/block_chain_test.go
+2
-2
state_object_test.go
ethchain/state_object_test.go
+2
-2
No files found.
ethchain/block_chain_test.go
View file @
99fa9afa
...
@@ -50,7 +50,7 @@ func (tm *TestManager) Broadcast(msgType ethwire.MsgType, data []interface{}) {
...
@@ -50,7 +50,7 @@ func (tm *TestManager) Broadcast(msgType ethwire.MsgType, data []interface{}) {
}
}
func
NewTestManager
()
*
TestManager
{
func
NewTestManager
()
*
TestManager
{
ethutil
.
ReadConfig
(
".ethtest"
,
ethutil
.
LogStd
)
ethutil
.
ReadConfig
(
".ethtest"
,
ethutil
.
LogStd
,
""
)
db
,
err
:=
ethdb
.
NewMemDatabase
()
db
,
err
:=
ethdb
.
NewMemDatabase
()
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -74,7 +74,7 @@ func NewTestManager() *TestManager {
...
@@ -74,7 +74,7 @@ func NewTestManager() *TestManager {
func
(
tm
*
TestManager
)
AddFakeBlock
(
blk
[]
byte
)
error
{
func
(
tm
*
TestManager
)
AddFakeBlock
(
blk
[]
byte
)
error
{
block
:=
NewBlockFromBytes
(
blk
)
block
:=
NewBlockFromBytes
(
blk
)
tm
.
Blocks
=
append
(
tm
.
Blocks
,
block
)
tm
.
Blocks
=
append
(
tm
.
Blocks
,
block
)
err
:=
tm
.
StateManager
()
.
Process
Block
(
tm
.
StateManager
()
.
CurrentState
(),
block
,
false
)
err
:=
tm
.
StateManager
()
.
Process
(
block
,
false
)
return
err
return
err
}
}
func
(
tm
*
TestManager
)
CreateChain1
()
error
{
func
(
tm
*
TestManager
)
CreateChain1
()
error
{
...
...
ethchain/state_object_test.go
View file @
99fa9afa
...
@@ -9,7 +9,7 @@ import (
...
@@ -9,7 +9,7 @@ import (
)
)
func
TestSync
(
t
*
testing
.
T
)
{
func
TestSync
(
t
*
testing
.
T
)
{
ethutil
.
ReadConfig
(
""
,
ethutil
.
LogStd
)
ethutil
.
ReadConfig
(
""
,
ethutil
.
LogStd
,
""
)
db
,
_
:=
ethdb
.
NewMemDatabase
()
db
,
_
:=
ethdb
.
NewMemDatabase
()
state
:=
NewState
(
ethutil
.
NewTrie
(
db
,
""
))
state
:=
NewState
(
ethutil
.
NewTrie
(
db
,
""
))
...
@@ -28,7 +28,7 @@ func TestSync(t *testing.T) {
...
@@ -28,7 +28,7 @@ func TestSync(t *testing.T) {
}
}
func
TestObjectGet
(
t
*
testing
.
T
)
{
func
TestObjectGet
(
t
*
testing
.
T
)
{
ethutil
.
ReadConfig
(
""
,
ethutil
.
LogStd
)
ethutil
.
ReadConfig
(
""
,
ethutil
.
LogStd
,
""
)
db
,
_
:=
ethdb
.
NewMemDatabase
()
db
,
_
:=
ethdb
.
NewMemDatabase
()
ethutil
.
Config
.
Db
=
db
ethutil
.
Config
.
Db
=
db
...
...
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