mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
miner: re-enable miner
This commit is contained in:
parent
58e01e4058
commit
1363909843
1 changed files with 4 additions and 5 deletions
|
|
@ -30,6 +30,7 @@ import (
|
|||
"github.com/ethereum/go-ethereum/core"
|
||||
"github.com/ethereum/go-ethereum/core/state"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/core/vm"
|
||||
"github.com/ethereum/go-ethereum/ethdb"
|
||||
"github.com/ethereum/go-ethereum/event"
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
|
|
@ -614,11 +615,10 @@ func (env *Work) commitTransactions(mux *event.TypeMux, txs *types.TransactionsB
|
|||
|
||||
func (env *Work) commitTransaction(tx *types.Transaction, bc *core.BlockChain, coinbase common.Address, gp *core.GasPool) (error, []*types.Log) {
|
||||
|
||||
return fmt.Errorf("Mining disabled"), nil
|
||||
/*
|
||||
snap := env.state.Snapshot()
|
||||
|
||||
receipt, _, err := core.ApplyTransaction(env.config, bc, &coinbase, gp, env.state, env.header, tx, &env.header.GasUsed, vm.Config{})
|
||||
//This could probably be moved to the Work-scope, and be reused
|
||||
blockContext := core.NewBlockContext(env.header, coinbase, env.config)
|
||||
receipt, _, err := core.ApplyTransaction(env.config, bc, gp, env.state, env.header, tx, &env.header.GasUsed, &vm.Config{}, blockContext)
|
||||
if err != nil {
|
||||
env.state.RevertToSnapshot(snap)
|
||||
return err, nil
|
||||
|
|
@ -627,5 +627,4 @@ func (env *Work) commitTransaction(tx *types.Transaction, bc *core.BlockChain, c
|
|||
env.receipts = append(env.receipts, receipt)
|
||||
|
||||
return nil, receipt.Logs
|
||||
*/
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue