Skip to content

Commit 1e7ffc2

Browse files
committed
Wallet: remove cs_main requirement from CreateCoinStake
1 parent 2e7cdb2 commit 1e7ffc2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wallet/wallet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3085,8 +3085,8 @@ bool CWallet::CreateCoinStake(
30853085
outPoint,
30863086
it->pindex);
30873087

3088-
//new block came in, move on
3089-
if (WITH_LOCK(cs_main, return chainActive.Height()) != pindexPrev->nHeight) return false;
3088+
// New block came in, move on
3089+
if (WITH_LOCK(cs_wallet, return m_last_block_processed_height) != pindexPrev->nHeight) return false;
30903090

30913091
// Make sure the wallet is unlocked and shutdown hasn't been requested
30923092
if (IsLocked() || ShutdownRequested()) return false;

0 commit comments

Comments
 (0)