Skip to content

Commit

Permalink
Add extra lock check for OSX build
Browse files Browse the repository at this point in the history
Apparently my upstream checkpoint was in the middle of a series of
commits by ianofsky separating wallet from the main code.  This means
that I have to add this main lock which will be replaced by the
locked_chain interface in a subsequence catchup.
  • Loading branch information
stevenroose committed May 15, 2019
1 parent 872d39f commit 8331761
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/wallet/rpcwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5493,6 +5493,7 @@ UniValue claimpegin(const JSONRPCRequest& request)

// To check if it's not double spending an existing pegin UTXO, we check mempool acceptance.
CValidationState acceptState;
LockAnnotation lock(::cs_main); //TODO(stevenroose) replace with locked_chain later
bool accepted = ::AcceptToMemoryPool(mempool, acceptState, MakeTransactionRef(mtx), nullptr /* pfMissingInputs */,
nullptr /* plTxnReplaced */, false /* bypass_limits */, maxTxFee, true /* test_accept */);
if (!accepted) {
Expand Down
1 change: 1 addition & 0 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2510,6 +2510,7 @@ bool CWallet::SelectCoinsMinConf(const CAmountMap& mapTargetValue, const CoinEli

bool CWallet::SelectCoins(const std::vector<COutput>& vAvailableCoins, const CAmountMap& mapTargetValue, std::set<CInputCoin>& setCoinsRet, CAmountMap& mapValueRet, const CCoinControl& coin_control, CoinSelectionParams& coin_selection_params, bool& bnb_used) const
{
AssertLockHeld(cs_wallet); // mapWallet
std::vector<COutput> vCoins(vAvailableCoins);

// coin control -> return all selected outputs (we want all selected to go into the transaction for sure)
Expand Down

0 comments on commit 8331761

Please sign in to comment.