19
19
20
20
namespace cluster_linearize {
21
21
22
- /* * Data type to represent cluster input.
23
- *
24
- * cluster[i].first is tx_i's fee and size.
25
- * cluster[i].second[j] is true iff tx_i spends one or more of tx_j's outputs.
26
- */
27
- template <typename SetType>
28
- using Cluster = std::vector<std::pair<FeeFrac, SetType>>;
29
-
30
22
/* * Data type to represent transaction indices in clusters. */
31
23
using ClusterIndex = uint32_t ;
32
24
@@ -54,7 +46,7 @@ class DepGraph
54
46
Entry (const FeeFrac& f, const SetType& a, const SetType& d) noexcept : feerate(f), ancestors(a), descendants(d) {}
55
47
};
56
48
57
- /* * Data for each transaction, in the same order as the Cluster it was constructed from . */
49
+ /* * Data for each transaction. */
58
50
std::vector<Entry> entries;
59
51
60
52
/* * Which positions are used. */
@@ -79,35 +71,6 @@ class DepGraph
79
71
DepGraph& operator =(const DepGraph&) noexcept = default ;
80
72
DepGraph& operator =(DepGraph&&) noexcept = default ;
81
73
82
- /* * Construct a DepGraph object for ntx transactions, with no dependencies.
83
- *
84
- * Complexity: O(N) where N=ntx.
85
- **/
86
- explicit DepGraph (ClusterIndex ntx) noexcept
87
- {
88
- Assume (ntx <= SetType::Size ());
89
- entries.resize (ntx);
90
- for (ClusterIndex i = 0 ; i < ntx; ++i) {
91
- entries[i].ancestors = SetType::Singleton (i);
92
- entries[i].descendants = SetType::Singleton (i);
93
- }
94
- m_used = SetType::Fill (ntx);
95
- }
96
-
97
- /* * Construct a DepGraph object given a cluster.
98
- *
99
- * Complexity: O(N^2) where N=cluster.size().
100
- */
101
- explicit DepGraph (const Cluster<SetType>& cluster) noexcept : DepGraph(cluster.size())
102
- {
103
- for (ClusterIndex i = 0 ; i < cluster.size (); ++i) {
104
- // Fill in fee and size.
105
- entries[i].feerate = cluster[i].first ;
106
- // Fill in dependencies.
107
- AddDependencies (cluster[i].second , i);
108
- }
109
- }
110
-
111
74
/* * Construct a DepGraph object given another DepGraph and a mapping from old to new.
112
75
*
113
76
* @param depgraph The original DepGraph that is being remapped.
0 commit comments