Skip to content

Commit bfeb225

Browse files
Merge pull request #564 from mxaddict/added-another-lock-for-cs_main
Added a lock before we call GetTxStakeAmount()
2 parents 9f55518 + 1ca42fb commit bfeb225

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3215,6 +3215,9 @@ int64_t GetFirstStakeTime()
32153215
// return int = Number of Wallet's elements analyzed
32163216
int GetsStakeSubTotal(vStakePeriodRange_T& aRange)
32173217
{
3218+
// Lock cs_main before we try to call GetTxStakeAmount
3219+
LOCK(cs_main);
3220+
32183221
int nElement = 0;
32193222
int64_t nAmount = 0;
32203223

0 commit comments

Comments
 (0)