-
Notifications
You must be signed in to change notification settings - Fork 21.5k
miner: add support for --miner.notify.full flag #22558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6b04e73
be505ac
a5788fa
2f6d93e
46d5fc6
da2ba70
f120b86
9698777
22bb4d1
32dd293
f9e5046
8ef9197
7330127
a44ad82
456bcab
bbc8feb
082118b
830e0fc
c89ed7e
47fe83f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -213,25 +213,23 @@ func CreateConsensusEngine(stack *node.Node, chainConfig *params.ChainConfig, co | |
| switch config.PowMode { | ||
| case ethash.ModeFake: | ||
| log.Warn("Ethash used in fake mode") | ||
| return ethash.NewFaker() | ||
| case ethash.ModeTest: | ||
| log.Warn("Ethash used in test mode") | ||
| return ethash.NewTester(nil, noverify) | ||
| case ethash.ModeShared: | ||
| log.Warn("Ethash used in shared mode") | ||
| return ethash.NewShared() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The idea here is to use a shared instance, but that's just ignored in these changes...?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is now fixed as well. The main constructor |
||
| default: | ||
| engine := ethash.New(ethash.Config{ | ||
| CacheDir: stack.ResolvePath(config.CacheDir), | ||
| CachesInMem: config.CachesInMem, | ||
| CachesOnDisk: config.CachesOnDisk, | ||
| CachesLockMmap: config.CachesLockMmap, | ||
| DatasetDir: config.DatasetDir, | ||
| DatasetsInMem: config.DatasetsInMem, | ||
| DatasetsOnDisk: config.DatasetsOnDisk, | ||
| DatasetsLockMmap: config.DatasetsLockMmap, | ||
| }, notify, noverify) | ||
| engine.SetThreads(-1) // Disable CPU mining | ||
| return engine | ||
| } | ||
| engine := ethash.New(ethash.Config{ | ||
| PowMode: config.PowMode, | ||
| CacheDir: stack.ResolvePath(config.CacheDir), | ||
| CachesInMem: config.CachesInMem, | ||
| CachesOnDisk: config.CachesOnDisk, | ||
| CachesLockMmap: config.CachesLockMmap, | ||
| DatasetDir: config.DatasetDir, | ||
| DatasetsInMem: config.DatasetsInMem, | ||
| DatasetsOnDisk: config.DatasetsOnDisk, | ||
| DatasetsLockMmap: config.DatasetsLockMmap, | ||
| NotifyFull: config.NotifyFull, | ||
| }, notify, noverify) | ||
| engine.SetThreads(-1) // Disable CPU mining | ||
| return engine | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
NewTesterdid some more stuff that is now skipped:Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code in
NewTesterwas just a copy of the normal constructor. I've fixed it now to just call that instead.