Refactor mining. Remove a few mining goroutines (#338)
* add context
* extract chain events
* run commit in goroutines
* mine only on canonical
* typo
* linters
* fmt
* mark unused methods
* restore stress test
* test single miner
* remove unsafe Trie storage
* remove locks from miner
* restore interrupt
* remove result goroutine
* remove unconfirmedBlocks
* cherry-pick 04a1d475ff1a36ad8f92fec80385df18c52bdc1f
* extract uncles
* one miner succeeded
* restore context cancel
* cleanup
* skip an unstable test
* remove pending state
* use context instead of interrupt func
* calculate sealHash only once
* comment out unstable test
* after merge
* fix after merge
Co-authored-by:
ledgerwatch <akhounov@gmail.com>
Showing
- .golangci/step2.yml 5 additions, 1 deletion.golangci/step2.yml
- accounts/abi/bind/backends/simulated.go 1 addition, 1 deletionaccounts/abi/bind/backends/simulated.go
- cmd/geth/retesteth.go 20 additions, 4 deletionscmd/geth/retesteth.go
- cmd/hack/hack.go 2 additions, 1 deletioncmd/hack/hack.go
- cmd/pics/state.go 8 additions, 8 deletionscmd/pics/state.go
- cmd/rpcdaemon/commands/daemon.go 1 addition, 1 deletioncmd/rpcdaemon/commands/daemon.go
- cmd/utils/cmd.go 2 additions, 1 deletioncmd/utils/cmd.go
- common/context.go 16 additions, 0 deletionscommon/context.go
- consensus/clique/clique.go 2 additions, 2 deletionsconsensus/clique/clique.go
- consensus/clique/clique_test.go 2 additions, 2 deletionsconsensus/clique/clique_test.go
- consensus/clique/snapshot_test.go 3 additions, 2 deletionsconsensus/clique/snapshot_test.go
- consensus/consensus.go 1 addition, 1 deletionconsensus/consensus.go
- consensus/ethash/ethash_test.go 6 additions, 5 deletionsconsensus/ethash/ethash_test.go
- consensus/ethash/sealer.go 44 additions, 42 deletionsconsensus/ethash/sealer.go
- consensus/ethash/sealer_test.go 6 additions, 4 deletionsconsensus/ethash/sealer_test.go
- consensus/result.go 35 additions, 0 deletionsconsensus/result.go
- core/bench_test.go 5 additions, 3 deletionscore/bench_test.go
- core/block_validator_test.go 1 addition, 1 deletioncore/block_validator_test.go
- core/blockchain.go 70 additions, 31 deletionscore/blockchain.go
- core/blockchain_test.go 52 additions, 49 deletionscore/blockchain_test.go
Loading
Please register or sign in to comment