I have discovered a bug in peercoind that minting only works when the wallet is directly loaded at startup. When peercoind is launched without loading a wallet on startup, the following appears in debug.log:
[...]
2025-01-06T03:33:02Z Loaded 2 addresses from "anchors.dat"
2025-01-06T03:33:02Z 2 block-relay-only anchors will be tried for connections.
2025-01-06T03:33:02Z init message: Starting network threads…
2025-01-06T03:33:02Z net thread start
2025-01-06T03:33:02Z dnsseed thread start
2025-01-06T03:33:02Z addcon thread start
2025-01-06T03:33:02Z opencon thread start
2025-01-06T03:33:02Z Waiting 300 seconds before querying DNS seeds.
2025-01-06T03:33:02Z msghand thread start
2025-01-06T03:33:02Z init message: Done loading
2025-01-06T03:33:02Z minter thread start
2025-01-06T03:33:02Z ThreadStakeMinter started
2025-01-06T03:33:02Z ThreadStakeMinter exiting
2025-01-06T03:33:02Z minter thread exit
[...]
When using the “peercoin-cli loadwallet” command to load a wallet manually, it is expected that minting also gets enabled. However, minting does actually not work, even though the “attempts” values shown in the “listminting” command are increasing!
With a wallet loaded on startup (peercoind -wallet=<wallet_name>), it works:
[...]
2025-01-06T03:36:45Z Loaded 2 addresses from "anchors.dat"
2025-01-06T03:36:45Z 2 block-relay-only anchors will be tried for connections.
2025-01-06T03:36:45Z init message: Starting network threads…
2025-01-06T03:36:45Z net thread start
2025-01-06T03:36:45Z dnsseed thread start
2025-01-06T03:36:45Z addcon thread start
2025-01-06T03:36:45Z Waiting 300 seconds before querying DNS seeds.
2025-01-06T03:36:45Z opencon thread start
2025-01-06T03:36:45Z msghand thread start
2025-01-06T03:36:45Z init message: Done loading
2025-01-06T03:36:45Z minter thread start
2025-01-06T03:36:45Z ThreadStakeMinter started
2025-01-06T03:36:45Z CPUMiner started for proof-of-stake
2025-01-06T03:36:45Z Set proof-of-stake timeout: 590ms for 9 UTXOs
[...]