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
74cec80e
Commit
74cec80e
authored
Sep 23, 2021
by
George Hotz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
meh, good enough
parent
d368578a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
fake_ethash.go
minigeth/consensus/ethash/fake_ethash.go
+1
-1
main.go
minigeth/main.go
+11
-3
No files found.
minigeth/consensus/ethash/fake_ethash.go
View file @
74cec80e
...
...
@@ -101,7 +101,7 @@ func (ethash *Ethash) Finalize(chain consensus.ChainHeaderReader, header *types.
// Accumulate any block and uncle rewards and commit the final state root
accumulateRewards
(
chain
.
Config
(),
state
,
header
,
uncles
)
header
.
Root
=
state
.
IntermediateRoot
(
chain
.
Config
()
.
IsEIP158
(
header
.
Number
))
fmt
.
Println
(
"new Root"
,
header
.
Root
)
//
fmt.Println("new Root", header.Root)
}
func
(
ethash
*
Ethash
)
FinalizeAndAssemble
(
chain
consensus
.
ChainHeaderReader
,
header
*
types
.
Header
,
state
*
state
.
StateDB
,
txs
[]
*
types
.
Transaction
,
uncles
[]
*
types
.
Header
,
receipts
[]
*
types
.
Receipt
)
(
*
types
.
Block
,
error
)
{
...
...
minigeth/main.go
View file @
74cec80e
...
...
@@ -14,8 +14,16 @@ import (
)
func
main
()
{
//blockNumber := 13284469
blockNumber
:=
13284491
// 0 tx
//blockNumber := 13284491
// low tx
blockNumber
:=
13284469
// more tx with delete issue
//blockNumber := 13284053
// read header
var
header
types
.
Header
{
...
...
@@ -67,5 +75,5 @@ func main() {
/*outHash, err := statedb.Commit(true)
fmt.Println(err)*/
fmt
.
Println
(
"process done with hash"
,
header
.
Root
,
"-
?>
"
,
newheader
.
Root
)
fmt
.
Println
(
"process done with hash"
,
header
.
Root
,
"-
>"
,
block
.
Header
()
.
Root
,
"real
"
,
newheader
.
Root
)
}
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