@@ -210,7 +210,7 @@ class DescriptorImpl : public Descriptor
210
210
// ! Public key arguments for this descriptor (size 1 for PK, PKH, WPKH; any size of Multisig).
211
211
const std::vector<std::unique_ptr<PubkeyProvider>> m_pubkey_args;
212
212
// ! The sub-descriptor argument (nullptr for everything but SH and WSH).
213
- const std::unique_ptr<DescriptorImpl> m_script_arg ;
213
+ const std::unique_ptr<DescriptorImpl> m_subdescriptor_arg ;
214
214
// ! The string name of the descriptor function.
215
215
const std::string m_name;
216
216
@@ -221,23 +221,23 @@ class DescriptorImpl : public Descriptor
221
221
/* * A helper function to construct the scripts for this descriptor.
222
222
*
223
223
* This function is invoked once for every CScript produced by evaluating
224
- * m_script_arg , or just once in case m_script_arg is nullptr.
224
+ * m_subdescriptor_arg , or just once in case m_subdescriptor_arg is nullptr.
225
225
226
226
* @param pubkeys The evaluations of the m_pubkey_args field.
227
- * @param script The evaluation of m_script_arg (or nullptr when m_script_arg is nullptr).
227
+ * @param script The evaluation of m_subdescriptor_arg (or nullptr when m_subdescriptor_arg is nullptr).
228
228
* @param out A FlatSigningProvider to put scripts or public keys in that are necessary to the solver.
229
229
* The script and pubkeys argument to this function are automatically added.
230
230
* @return A vector with scriptPubKeys for this descriptor.
231
231
*/
232
232
virtual std::vector<CScript> MakeScripts (const std::vector<CPubKey>& pubkeys, const CScript* script, FlatSigningProvider& out) const = 0;
233
233
234
234
public:
235
- DescriptorImpl (std::vector<std::unique_ptr<PubkeyProvider>> pubkeys, std::unique_ptr<DescriptorImpl> script, const std::string& name) : m_pubkey_args(std::move(pubkeys)), m_script_arg (std::move(script)), m_name(name) {}
235
+ DescriptorImpl (std::vector<std::unique_ptr<PubkeyProvider>> pubkeys, std::unique_ptr<DescriptorImpl> script, const std::string& name) : m_pubkey_args(std::move(pubkeys)), m_subdescriptor_arg (std::move(script)), m_name(name) {}
236
236
237
237
bool IsSolvable () const override
238
238
{
239
- if (m_script_arg ) {
240
- if (!m_script_arg ->IsSolvable ()) return false ;
239
+ if (m_subdescriptor_arg ) {
240
+ if (!m_subdescriptor_arg ->IsSolvable ()) return false ;
241
241
}
242
242
return true ;
243
243
}
@@ -247,8 +247,8 @@ class DescriptorImpl : public Descriptor
247
247
for (const auto & pubkey : m_pubkey_args) {
248
248
if (pubkey->IsRange ()) return true ;
249
249
}
250
- if (m_script_arg ) {
251
- if (m_script_arg ->IsRange ()) return true ;
250
+ if (m_subdescriptor_arg ) {
251
+ if (m_subdescriptor_arg ->IsRange ()) return true ;
252
252
}
253
253
return false ;
254
254
}
@@ -268,10 +268,10 @@ class DescriptorImpl : public Descriptor
268
268
}
269
269
ret += std::move (tmp);
270
270
}
271
- if (m_script_arg ) {
271
+ if (m_subdescriptor_arg ) {
272
272
if (pos++) ret += " ," ;
273
273
std::string tmp;
274
- if (!m_script_arg ->ToStringHelper (arg, tmp, priv)) return false ;
274
+ if (!m_subdescriptor_arg ->ToStringHelper (arg, tmp, priv)) return false ;
275
275
ret += std::move (tmp);
276
276
}
277
277
out = std::move (ret) + " )" ;
@@ -311,9 +311,9 @@ class DescriptorImpl : public Descriptor
311
311
}
312
312
}
313
313
std::vector<CScript> subscripts;
314
- if (m_script_arg ) {
314
+ if (m_subdescriptor_arg ) {
315
315
FlatSigningProvider subprovider;
316
- if (!m_script_arg ->ExpandHelper (pos, arg, cache_read, subscripts, subprovider, cache_write)) return false ;
316
+ if (!m_subdescriptor_arg ->ExpandHelper (pos, arg, cache_read, subscripts, subprovider, cache_write)) return false ;
317
317
out = Merge (out, subprovider);
318
318
}
319
319
@@ -324,7 +324,7 @@ class DescriptorImpl : public Descriptor
324
324
out.origins .emplace (entry.first .GetID (), std::move (entry.second ));
325
325
out.pubkeys .emplace (entry.first .GetID (), entry.first );
326
326
}
327
- if (m_script_arg ) {
327
+ if (m_subdescriptor_arg ) {
328
328
for (const auto & subscript : subscripts) {
329
329
out.scripts .emplace (CScriptID (subscript), subscript);
330
330
std::vector<CScript> addscripts = MakeScripts (pubkeys, &subscript, out);
0 commit comments