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
27a03d3e
Commit
27a03d3e
authored
Jan 29, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated to the new Trie
parent
6ab368cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
dev_console.go
dev_console.go
+5
-5
ethereum.go
ethereum.go
+2
-2
No files found.
dev_console.go
View file @
27a03d3e
...
...
@@ -76,11 +76,11 @@ func (i *Console) ValidateInput(action string, argumentLength int) error {
}
func
(
i
*
Console
)
PrintRoot
()
{
root
:=
ethutil
.
Conv
(
i
.
trie
.
Root
T
)
root
:=
ethutil
.
Conv
(
i
.
trie
.
Root
)
if
len
(
root
.
AsBytes
())
!=
0
{
fmt
.
Println
(
hex
.
EncodeToString
(
root
.
AsBytes
()))
}
else
{
fmt
.
Println
(
i
.
trie
.
Root
T
)
fmt
.
Println
(
i
.
trie
.
Root
)
}
}
...
...
@@ -108,15 +108,15 @@ func (i *Console) ParseInput(input string) bool {
}
else
{
switch
tokens
[
0
]
{
case
"update"
:
i
.
trie
.
Update
T
(
tokens
[
1
],
tokens
[
2
])
i
.
trie
.
Update
(
tokens
[
1
],
tokens
[
2
])
i
.
PrintRoot
()
case
"get"
:
fmt
.
Println
(
i
.
trie
.
Get
T
(
tokens
[
1
]))
fmt
.
Println
(
i
.
trie
.
Get
(
tokens
[
1
]))
case
"root"
:
i
.
PrintRoot
()
case
"rawroot"
:
fmt
.
Println
(
i
.
trie
.
Root
T
)
fmt
.
Println
(
i
.
trie
.
Root
)
case
"print"
:
i
.
db
.
Print
()
case
"dag"
:
...
...
ethereum.go
View file @
27a03d3e
...
...
@@ -84,7 +84,7 @@ func main() {
ethereum
.
Start
()
if
StartMining
{
blockTime
:=
time
.
Duration
(
2
)
blockTime
:=
time
.
Duration
(
10
)
log
.
Printf
(
"Dev Test Mining started. Blocks found each %d seconds
\n
"
,
blockTime
)
// Fake block mining. It broadcasts a new block every 5 seconds
...
...
@@ -107,7 +107,7 @@ func main() {
if
err
!=
nil
{
log
.
Println
(
err
)
}
else
{
log
.
Println
(
"
\n
+++++++ MINED BLK +++++++
\n
"
,
block
.
String
())
//
log.Println("\n+++++++ MINED BLK +++++++\n", block.String())
}
}
}()
...
...
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