| 108 | } |
| 109 | |
| 110 | std::optional<std::string> EntriesAndTxidsDisjoint(const CTxMemPool::setEntries& ancestors, |
| 111 | const std::set<uint256>& direct_conflicts, |
| 112 | const uint256& txid) |
| 113 | { |
| 114 | for (CTxMemPool::txiter ancestorIt : ancestors) { |
| 115 | const uint256& hashAncestor = ancestorIt->GetTx().GetHash(); |
| 116 | if (direct_conflicts.count(hashAncestor)) { |
| 117 | return strprintf("%s spends conflicting transaction %s", |
| 118 | txid.ToString(), |
| 119 | hashAncestor.ToString()); |
| 120 | } |
| 121 | } |
| 122 | return std::nullopt; |
| 123 | } |
| 124 | |
| 125 | std::optional<std::string> PaysMoreThanConflicts(const CTxMemPool::setEntries& iters_conflicting, |
| 126 | CFeeRate replacement_feerate, |