Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
exchain
nebula
Commits
8c7e6222
Unverified
Commit
8c7e6222
authored
Sep 27, 2021
by
George Hotz
Committed by
GitHub
Sep 27, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11 from han0110/fix/missing-difficulty
Fix: set missing difficulty in block header
parents
3b40aa6c
6ed64003
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
209 additions
and
26 deletions
+209
-26
fake_ethash.go
minigeth/consensus/ethash/fake_ethash.go
+205
-24
main.go
minigeth/main.go
+2
-0
prefetch.go
minigeth/oracle/prefetch.go
+1
-1
preimage.go
minigeth/oracle/preimage.go
+1
-1
No files found.
minigeth/consensus/ethash/fake_ethash.go
View file @
8c7e6222
This diff is collapsed.
Click to expand it.
minigeth/main.go
View file @
8c7e6222
...
@@ -68,6 +68,8 @@ func main() {
...
@@ -68,6 +68,8 @@ func main() {
processor
:=
core
.
NewStateProcessor
(
params
.
MainnetChainConfig
,
bc
,
bc
.
Engine
())
processor
:=
core
.
NewStateProcessor
(
params
.
MainnetChainConfig
,
bc
,
bc
.
Engine
())
fmt
.
Println
(
"processing state:"
,
parent
.
Number
,
"->"
,
newheader
.
Number
)
fmt
.
Println
(
"processing state:"
,
parent
.
Number
,
"->"
,
newheader
.
Number
)
newheader
.
Difficulty
=
bc
.
Engine
()
.
CalcDifficulty
(
bc
,
newheader
.
Time
,
&
parent
)
// read txs
// read txs
//traverseStackTrie(newheader.TxHash)
//traverseStackTrie(newheader.TxHash)
...
...
minigeth/oracle/prefetch.go
View file @
8c7e6222
...
@@ -197,7 +197,7 @@ func Output(output common.Hash) {
...
@@ -197,7 +197,7 @@ func Output(output common.Hash) {
if
output
==
inputs
[
6
]
{
if
output
==
inputs
[
6
]
{
fmt
.
Println
(
"good transition"
)
fmt
.
Println
(
"good transition"
)
}
else
{
}
else
{
fmt
.
Println
(
output
,
"!="
,
inputs
[
5
])
fmt
.
Println
(
output
,
"!="
,
inputs
[
6
])
panic
(
"BAD transition :(("
)
panic
(
"BAD transition :(("
)
}
}
}
}
...
...
minigeth/oracle/preimage.go
View file @
8c7e6222
...
@@ -21,7 +21,7 @@ func Preimage(hash common.Hash) []byte {
...
@@ -21,7 +21,7 @@ func Preimage(hash common.Hash) []byte {
fmt
.
Println
(
"can't find preimage"
,
hash
)
fmt
.
Println
(
"can't find preimage"
,
hash
)
}
}
comphash
:=
crypto
.
Keccak256Hash
(
val
)
comphash
:=
crypto
.
Keccak256Hash
(
val
)
if
hash
!=
comphash
{
if
ok
&&
hash
!=
comphash
{
panic
(
"corruption in hash "
+
hash
.
String
())
panic
(
"corruption in hash "
+
hash
.
String
())
}
}
return
val
return
val
...
...
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