Bug in peercoind v0.14.10: Minting only works when wallet is loaded at startup

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
[...]
4 Likes

Sounds like something that could definitely be improved, you might consider hiring a software developer to look into it GitHub - peercoin/peercoin: Reference implementation of the Peercoin protocol.

It seems to me that minting works in most cases we tend to think about supporting so I don’t see this as a pressing issue. Perhaps you could describe in more depth why you need this functionality to work the way you want to use it?

1 Like

I find this response rather disappointing. Refusal to fix bugs like this is an indication of a dead project.

If this coin wants to be a drop-in-replacement for bitcoind, then it should support all the features of bitcoind. Which includes wallet hot-loading/unloading.

1 Like

thank you for the bug report, ive tried to resolve it, but wasnt successful yet, if you make an issue on github ill make sure its part of 0.15

1 Like