MCPcopy Create free account
hub / github.com/LUX-Core/lux / GetConflicts

Method GetConflicts

src/wallet.cpp:560–580  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

558}
559
560set<uint256> CWallet::GetConflicts(const uint256& txid) const
561{
562 set<uint256> result;
563 AssertLockHeld(cs_wallet);
564
565 std::map<uint256, CWalletTx>::const_iterator it = mapWallet.find(txid);
566 if (it == mapWallet.end())
567 return result;
568 const CWalletTx& wtx = it->second;
569
570 std::pair<TxSpends::const_iterator, TxSpends::const_iterator> range;
571
572 for (const CTxIn& txin : wtx.vin) {
573 if (mapTxSpends.count(txin.prevout) <= 1)
574 continue; // No conflict if zero or one spends
575 range = mapTxSpends.equal_range(txin.prevout);
576 for (TxSpends::const_iterator it = range.first; it != range.second; ++it)
577 result.insert(it->second);
578 }
579 return result;
580}
581
582void CWallet::SyncMetaData(pair<TxSpends::iterator, TxSpends::iterator> range)
583{

Callers 2

WalletTxToJSONFunction · 0.80

Calls 5

findMethod · 0.45
endMethod · 0.45
countMethod · 0.45
equal_rangeMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected