upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/script.cpp
diff options
context:
space:
mode:
authorBitflash <btf01@proton.me>2026-08-01 14:29:28 -0300
committerGitHub <noreply@github.com>2026-08-01 14:29:28 -0300
commit07ba3481e2624d85eaf5ff5808bd2d0280bcbb22 (patch)
treeaaebaffadd2ae2a0f10b192fc164890fd1dcbcbd /src/script.cpp
parente8d88f8dbc264763f6a34359102dca55677946d9 (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/script.cpp')
0 files changed, 0 insertions, 0 deletions