mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-08 13:49:35 +02:00
[refactor] change Workspace::m_conflicts and adjacent funcs/structs to use Txid
It's preferable to use type-safe transaction identifiers to avoid confusing txid and wtxid. The next commit will add a reference to this set; we use this opportunity to change it to Txid ahead of time instead of adding new uses of uint256.
This commit is contained in:
@@ -115,11 +115,11 @@ std::optional<std::string> HasNoNewUnconfirmed(const CTransaction& tx,
|
||||
}
|
||||
|
||||
std::optional<std::string> EntriesAndTxidsDisjoint(const CTxMemPool::setEntries& ancestors,
|
||||
const std::set<uint256>& direct_conflicts,
|
||||
const std::set<Txid>& direct_conflicts,
|
||||
const uint256& txid)
|
||||
{
|
||||
for (CTxMemPool::txiter ancestorIt : ancestors) {
|
||||
const uint256& hashAncestor = ancestorIt->GetTx().GetHash();
|
||||
const Txid& hashAncestor = ancestorIt->GetTx().GetHash();
|
||||
if (direct_conflicts.count(hashAncestor)) {
|
||||
return strprintf("%s spends conflicting transaction %s",
|
||||
txid.ToString(),
|
||||
|
||||
@@ -80,7 +80,7 @@ std::optional<std::string> HasNoNewUnconfirmed(const CTransaction& tx, const CTx
|
||||
* @returns error message if the sets intersect, std::nullopt if they are disjoint.
|
||||
*/
|
||||
std::optional<std::string> EntriesAndTxidsDisjoint(const CTxMemPool::setEntries& ancestors,
|
||||
const std::set<uint256>& direct_conflicts,
|
||||
const std::set<Txid>& direct_conflicts,
|
||||
const uint256& txid);
|
||||
|
||||
/** Check that the feerate of the replacement transaction(s) is higher than the feerate of each
|
||||
|
||||
Reference in New Issue
Block a user