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
1085960e
Commit
1085960e
authored
Dec 30, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed trie
parent
8df689bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
main.go
cmd/evm/main.go
+2
-2
trie.go
tests/helper/trie.go
+3
-3
No files found.
cmd/evm/main.go
View file @
1085960e
...
...
@@ -37,8 +37,8 @@ import (
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/ptrie"
"github.com/ethereum/go-ethereum/state"
"github.com/ethereum/go-ethereum/trie"
"github.com/ethereum/go-ethereum/vm"
)
...
...
@@ -65,7 +65,7 @@ func main() {
ethutil
.
ReadConfig
(
"/tmp/evmtest"
,
"/tmp/evm"
,
""
)
db
,
_
:=
ethdb
.
NewMemDatabase
()
statedb
:=
state
.
New
(
trie
.
New
(
db
,
""
))
statedb
:=
state
.
New
(
ptrie
.
New
(
nil
,
db
))
sender
:=
statedb
.
NewStateObject
([]
byte
(
"sender"
))
receiver
:=
statedb
.
NewStateObject
([]
byte
(
"receiver"
))
//receiver.SetCode([]byte(*code))
...
...
tests/helper/trie.go
View file @
1085960e
package
helper
import
"github.com/ethereum/go-ethereum/trie"
import
"github.com/ethereum/go-ethereum/
p
trie"
type
MemDatabase
struct
{
db
map
[
string
][]
byte
...
...
@@ -24,8 +24,8 @@ func (db *MemDatabase) Print() {}
func
(
db
*
MemDatabase
)
Close
()
{}
func
(
db
*
MemDatabase
)
LastKnownTD
()
[]
byte
{
return
nil
}
func
NewTrie
()
*
trie
.
Trie
{
func
NewTrie
()
*
p
trie
.
Trie
{
db
,
_
:=
NewMemDatabase
()
return
trie
.
New
(
db
,
""
)
return
ptrie
.
New
(
nil
,
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