mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-09 18:00:13 +02:00
TxGraphImpl::PullIn: only allowed when staging exists
This commit is contained in:
@ -411,8 +411,8 @@ public:
|
|||||||
* values for remaining Entry objects, so this only does something when no to-be-applied
|
* values for remaining Entry objects, so this only does something when no to-be-applied
|
||||||
* operations 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.
|
||||||
* effect if only a main graph exists, but if staging exists this modifies the locators of its
|
* Staging must exist, and this modifies the locators of its
|
||||||
* transactions from inherited (P,M) to explicit (P,P). */
|
* transactions from inherited (P,M) to explicit (P,P). */
|
||||||
Cluster* PullIn(Cluster* cluster) noexcept;
|
Cluster* PullIn(Cluster* cluster) noexcept;
|
||||||
/** Apply all removals queued up in m_to_remove to the relevant Clusters (which get a
|
/** Apply all removals queued up in m_to_remove to the relevant Clusters (which get a
|
||||||
@ -928,7 +928,7 @@ Cluster* TxGraphImpl::FindCluster(GraphIndex idx, int level) const noexcept
|
|||||||
Cluster* TxGraphImpl::PullIn(Cluster* cluster) noexcept
|
Cluster* TxGraphImpl::PullIn(Cluster* cluster) noexcept
|
||||||
{
|
{
|
||||||
int to_level = GetTopLevel();
|
int to_level = GetTopLevel();
|
||||||
if (to_level == 0) return cluster;
|
Assume(to_level == 1);
|
||||||
int level = cluster->m_level;
|
int level = cluster->m_level;
|
||||||
Assume(level <= to_level);
|
Assume(level <= to_level);
|
||||||
// Copy the Cluster from main to staging, if it's not already there.
|
// Copy the Cluster from main to staging, if it's not already there.
|
||||||
|
Reference in New Issue
Block a user