Skip to content

Commit

Permalink
wallet, pos: Add lock of cs_wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
backpacker69 authored and lateminer committed Sep 20, 2023
1 parent 7dc16a0 commit 79eccb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ void static ThreadStakeMiner(std::shared_ptr<CWallet> pwallet, NodeContext& m_no
// peercoin: stake minter
void MinePoS(bool fGenerate, std::shared_ptr<CWallet> pwallet, NodeContext& m_node)
{
if (!pwallet->GetKeyPoolSize()) {
if (!WITH_LOCK(pwallet->cs_wallet, return pwallet->GetKeyPoolSize())) {
LogPrintf("Error: Keypool is empty, please make sure the wallet contains keys and call keypoolrefill before restarting the mining thread\n");
fEnableStaking = false;
return;
Expand Down

0 comments on commit 79eccb6

Please sign in to comment.