Skip to content

Commit

Permalink
Merge pull request z-classic#167 from jc23424/rpc-calls
Browse files Browse the repository at this point in the history
lock when selecting anchor
  • Loading branch information
ch4ot1c authored Mar 1, 2018
2 parents b619e7f + b5d3a04 commit 16785ae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/wallet/asyncrpcoperation_shieldcoinbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,12 @@ void AsyncRPCOperation_shieldcoinbase::sign_send_raw_transaction(UniValue obj)


UniValue AsyncRPCOperation_shieldcoinbase::perform_joinsplit(ShieldCoinbaseJSInfo & info) {
uint256 anchor = pcoinsTip->GetBestAnchor();
uint256 anchor;
{
LOCK(cs_main);
anchor = pcoinsTip->GetBestAnchor();
}

if (anchor.IsNull()) {
throw std::runtime_error("anchor is null");
}
Expand Down

0 comments on commit 16785ae

Please sign in to comment.