Skip to content

Commit

Permalink
Merge pull request #564 from mxaddict/added-another-lock-for-cs_main
Browse files Browse the repository at this point in the history
Added a lock before we call GetTxStakeAmount()
  • Loading branch information
proletesseract committed Jul 13, 2019
2 parents 9f55518 + 1ca42fb commit bfeb225
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/wallet/rpcwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3215,6 +3215,9 @@ int64_t GetFirstStakeTime()
// return int = Number of Wallet's elements analyzed
int GetsStakeSubTotal(vStakePeriodRange_T& aRange)
{
// Lock cs_main before we try to call GetTxStakeAmount
LOCK(cs_main);

int nElement = 0;
int64_t nAmount = 0;

Expand Down

0 comments on commit bfeb225

Please sign in to comment.