mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
clusterlin: fix typos
This commit is contained in:
parent
777179bc27
commit
c7d5dcaa61
3 changed files with 7 additions and 7 deletions
|
@ -1367,7 +1367,7 @@ void FixLinearization(const DepGraph<SetType>& depgraph, std::span<DepGraphIndex
|
||||||
// in between forward.
|
// in between forward.
|
||||||
while (place_before.Any()) {
|
while (place_before.Any()) {
|
||||||
// j cannot be 0 here; if it was, then there was necessarily nothing earlier which
|
// j cannot be 0 here; if it was, then there was necessarily nothing earlier which
|
||||||
// elem needs to be place before anymore, and place_before would be empty.
|
// elem needs to be placed before anymore, and place_before would be empty.
|
||||||
Assume(j > 0);
|
Assume(j > 0);
|
||||||
auto to_swap = linearization[len - 1 - (j - 1)];
|
auto to_swap = linearization[len - 1 - (j - 1)];
|
||||||
place_before.Reset(to_swap);
|
place_before.Reset(to_swap);
|
||||||
|
|
|
@ -335,7 +335,7 @@ public:
|
||||||
|
|
||||||
// Simple helper functions.
|
// Simple helper functions.
|
||||||
|
|
||||||
/** Swap the Entrys referred to by a and b. */
|
/** Swap the Entry referred to by a and the one referred to by b. */
|
||||||
void SwapIndexes(GraphIndex a, GraphIndex b) noexcept;
|
void SwapIndexes(GraphIndex a, GraphIndex b) noexcept;
|
||||||
/** If idx exists in the specified level ClusterSet (explicitly, or in the level below and not
|
/** If idx exists in the specified level ClusterSet (explicitly, or in the level below and not
|
||||||
* removed), return the Cluster it is in. Otherwise, return nullptr. */
|
* removed), return the Cluster it is in. Otherwise, return nullptr. */
|
||||||
|
@ -408,8 +408,8 @@ public:
|
||||||
|
|
||||||
// Functions related to various normalization/application steps.
|
// Functions related to various normalization/application steps.
|
||||||
/** Get rid of unlinked Entry objects in m_entries, if possible (this changes the GraphIndex
|
/** Get rid of unlinked Entry objects in m_entries, if possible (this changes the GraphIndex
|
||||||
* values for remaining Entrys, so this only does something when no to-be-applied operations
|
* values for remaining Entry objects, so this only does something when no to-be-applied
|
||||||
* or staged removals referring to GraphIndexes remain). */
|
* operations or staged removals referring to GraphIndexes remain). */
|
||||||
void Compact() noexcept;
|
void Compact() noexcept;
|
||||||
/** If cluster is not in staging, copy it there, and return a pointer to it. This has no
|
/** If cluster is not in staging, copy it there, and return a pointer to it. This has no
|
||||||
* effect if only a main graph exists, but if staging exists this modifies the locators of its
|
* effect if only a main graph exists, but if staging exists this modifies the locators of its
|
||||||
|
@ -505,7 +505,7 @@ void TxGraphImpl::ClearLocator(int level, GraphIndex idx) noexcept
|
||||||
|
|
||||||
void Cluster::Updated(TxGraphImpl& graph) noexcept
|
void Cluster::Updated(TxGraphImpl& graph) noexcept
|
||||||
{
|
{
|
||||||
// Update all the Locators for this Cluster's Entrys.
|
// Update all the Locators for this Cluster's Entry objects.
|
||||||
for (DepGraphIndex idx : m_linearization) {
|
for (DepGraphIndex idx : m_linearization) {
|
||||||
auto& entry = graph.m_entries[m_mapping[idx]];
|
auto& entry = graph.m_entries[m_mapping[idx]];
|
||||||
entry.m_locator[m_level].SetPresent(this, idx);
|
entry.m_locator[m_level].SetPresent(this, idx);
|
||||||
|
@ -1937,7 +1937,7 @@ void Cluster::SanityCheck(const TxGraphImpl& graph, int level) const
|
||||||
assert(m_depgraph.IsConnected(linchunking.GetChunk(0).transactions));
|
assert(m_depgraph.IsConnected(linchunking.GetChunk(0).transactions));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Verify that each element of m_depgraph occured in m_linearization.
|
// Verify that each element of m_depgraph occurred in m_linearization.
|
||||||
assert(m_done == m_depgraph.Positions());
|
assert(m_done == m_depgraph.Positions());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ public:
|
||||||
/** Create a staging graph (which cannot exist already). This acts as if a full copy of
|
/** Create a staging graph (which cannot exist already). This acts as if a full copy of
|
||||||
* the transaction graph is made, upon which further modifications are made. This copy can
|
* the transaction graph is made, upon which further modifications are made. This copy can
|
||||||
* be inspected, and then either discarded, or the main graph can be replaced by it by
|
* be inspected, and then either discarded, or the main graph can be replaced by it by
|
||||||
* commiting it. */
|
* committing it. */
|
||||||
virtual void StartStaging() noexcept = 0;
|
virtual void StartStaging() noexcept = 0;
|
||||||
/** Discard the existing active staging graph (which must exist). */
|
/** Discard the existing active staging graph (which must exist). */
|
||||||
virtual void AbortStaging() noexcept = 0;
|
virtual void AbortStaging() noexcept = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue