mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-06 11:13:02 +02:00
clusterlin: Make IsAcyclic() a DepGraph member function
... instead of being a separate test-only function. Also add a fuzz test for it returning false.
This commit is contained in:
@@ -309,6 +309,17 @@ public:
|
||||
return a < b;
|
||||
});
|
||||
}
|
||||
|
||||
/** Check if this graph is acyclic. */
|
||||
bool IsAcyclic() const noexcept
|
||||
{
|
||||
for (auto i : Positions()) {
|
||||
if ((Ancestors(i) & Descendants(i)) != SetType::Singleton(i)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/** A set of transactions together with their aggregate feerate. */
|
||||
|
||||
Reference in New Issue
Block a user