txgraph: Allow Refs to outlive the TxGraph (feature)

This commit is contained in:
Pieter Wuille
2025-03-21 15:17:42 -04:00
parent 82fa3573e1
commit 22c68cd153
3 changed files with 22 additions and 1 deletions

View File

@@ -587,4 +587,10 @@ FUZZ_TARGET(txgraph)
// Sanity check again (because invoking inspectors may modify internal unobservable state).
real->SanityCheck();
// Kill the TxGraph object.
real.reset();
// Kill the simulated graphs, with all remaining Refs in it. If any, this verifies that Refs
// can outlive the TxGraph that created them.
sims.clear();
}