Commit 329212f9 authored by George Hotz's avatar George Hotz

it works

parent f8e72465
...@@ -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
}
...@@ -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) {
}
...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment