diff options
| author | Bitflash <btf01@proton.me> | 2026-08-01 14:29:28 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-01 14:29:28 -0300 |
| commit | 07ba3481e2624d85eaf5ff5808bd2d0280bcbb22 (patch) | |
| tree | aaebaffadd2ae2a0f10b192fc164890fd1dcbcbd /src/fuzz_net_message.cpp | |
| parent | e8d88f8dbc264763f6a34359102dca55677946d9 (diff) | |
mine: do not trust a stored generate flag with no mining mode beside it (#87)
fGenerateBitcoins and nMineMode only mean anything together, and a wallet.dat
can hold one without the other: Bitcoin 0.1.0 already wrote fGenerateBitcoins
when mining was toggled, years before this fork had a mode. #84 restored that
lone flag, which puts the node in the one state the miner cannot act on --
generate on, mode relay -- so every miner thread starts and returns at the relay
guard. The machine looks like it is mining and hashes nothing.
That happened to a 32-core node on its first 1.2.11 start: "Mining with 31
thread(s)" followed by 31 lines of "BitcoinMiner thread N returned true".
The flag is now believed only when the mode it belongs to was stored with it,
and the pair is made coherent either way.
Diffstat (limited to 'src/fuzz_net_message.cpp')
0 files changed, 0 insertions, 0 deletions