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
329212f9
Commit
329212f9
authored
Sep 14, 2021
by
George Hotz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
it works
parent
f8e72465
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
2 deletions
+24
-2
blockchain.go
minigeth/core/blockchain.go
+16
-0
statedb.go
minigeth/core/state/statedb.go
+5
-0
state_processor.go
minigeth/core/state_processor.go
+3
-2
No files found.
minigeth/core/blockchain.go
View file @
329212f9
...
@@ -24,3 +24,19 @@ func (bc *BlockChain) Engine() consensus.Engine { return bc.engine }
...
@@ -24,3 +24,19 @@ func (bc *BlockChain) Engine() consensus.Engine { return bc.engine }
func
(
bc
*
BlockChain
)
GetHeader
(
hash
common
.
Hash
,
number
uint64
)
*
types
.
Header
{
func
(
bc
*
BlockChain
)
GetHeader
(
hash
common
.
Hash
,
number
uint64
)
*
types
.
Header
{
return
nil
return
nil
}
}
func
(
bc
*
BlockChain
)
CurrentHeader
()
*
types
.
Header
{
return
nil
}
// GetHeaderByHash retrieves a block header from the database by hash, caching it if
// found.
func
(
bc
*
BlockChain
)
GetHeaderByHash
(
hash
common
.
Hash
)
*
types
.
Header
{
return
nil
}
// GetHeaderByNumber retrieves a block header from the database by number,
// caching it (associated with its hash) if found.
func
(
bc
*
BlockChain
)
GetHeaderByNumber
(
number
uint64
)
*
types
.
Header
{
return
nil
}
minigeth/core/state/statedb.go
View file @
329212f9
...
@@ -157,3 +157,8 @@ func (s *StateDB) SlotInAccessList(addr common.Address, slot common.Hash) (addre
...
@@ -157,3 +157,8 @@ func (s *StateDB) SlotInAccessList(addr common.Address, slot common.Hash) (addre
func
(
s
*
StateDB
)
Snapshot
()
int
{
func
(
s
*
StateDB
)
Snapshot
()
int
{
return
0
return
0
}
}
// Prepare sets the current transaction hash and index which are
// used when the EVM emits new state logs.
func
(
s
*
StateDB
)
Prepare
(
thash
common
.
Hash
,
ti
int
)
{
}
minigeth/core/state_processor.go
View file @
329212f9
...
@@ -74,9 +74,10 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
...
@@ -74,9 +74,10 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
gp
=
new
(
GasPool
)
.
AddGas
(
block
.
GasLimit
())
gp
=
new
(
GasPool
)
.
AddGas
(
block
.
GasLimit
())
)
)
// Mutate the block and state according to any hard-fork specs
// Mutate the block and state according to any hard-fork specs
if
p
.
config
.
DAOForkSupport
&&
p
.
config
.
DAOForkBlock
!=
nil
&&
p
.
config
.
DAOForkBlock
.
Cmp
(
block
.
Number
())
==
0
{
// lol, don't support the DAO block
/*if p.config.DAOForkSupport && p.config.DAOForkBlock != nil && p.config.DAOForkBlock.Cmp(block.Number()) == 0 {
misc.ApplyDAOHardFork(statedb)
misc.ApplyDAOHardFork(statedb)
}
}
*/
blockContext
:=
NewEVMBlockContext
(
header
,
p
.
bc
,
nil
)
blockContext
:=
NewEVMBlockContext
(
header
,
p
.
bc
,
nil
)
vmenv
:=
vm
.
NewEVM
(
blockContext
,
vm
.
TxContext
{},
statedb
,
p
.
config
,
cfg
)
vmenv
:=
vm
.
NewEVM
(
blockContext
,
vm
.
TxContext
{},
statedb
,
p
.
config
,
cfg
)
// Iterate over and process the individual transactions
// Iterate over and process the individual transactions
...
...
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