@@ -297,12 +297,12 @@ using miniscript::operator""_mst;
297
297
using Node = miniscript::Node<CPubKey>;
298
298
299
299
/* * Compute all challenges (pubkeys, hashes, timelocks) that occur in a given Miniscript. */
300
- std::set<Challenge> FindChallenges (const NodeRef& root)
300
+ std::set<Challenge> FindChallenges (const Node* root)
301
301
{
302
302
std::set<Challenge> chal;
303
303
304
- for (std::vector stack{root. get () }; !stack.empty ();) {
305
- const Node * ref{stack.back ()};
304
+ for (std::vector stack{root}; !stack.empty ();) {
305
+ const auto * ref{stack.back ()};
306
306
stack.pop_back ();
307
307
308
308
for (const auto & key : ref->keys ) {
@@ -348,7 +348,7 @@ struct MiniScriptTest : BasicTestingSetup {
348
348
/* * Run random satisfaction tests. */
349
349
void TestSatisfy (const KeyConverter& converter, const std::string& testcase, const NodeRef& node) {
350
350
auto script = node->ToScript (converter);
351
- const auto challenges{FindChallenges (node)}; // Find all challenges in the generated miniscript.
351
+ const auto challenges{FindChallenges (node. get () )}; // Find all challenges in the generated miniscript.
352
352
std::vector<Challenge> challist (challenges.begin (), challenges.end ());
353
353
for (int iter = 0 ; iter < 3 ; ++iter) {
354
354
std::shuffle (challist.begin (), challist.end (), m_rng);
0 commit comments