Skip to content

Commit 2290269

Browse files
committed
scripted-diff: rename DescriptorImpl m_script_arg to m_subdescriptor_arg
-BEGIN VERIFY SCRIPT- sed -i -e 's/m_script_arg/m_subdescriptor_arg/g' src/script/descriptor.cpp -END VERIFY SCRIPT-
1 parent 7275365 commit 2290269

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/script/descriptor.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ class DescriptorImpl : public Descriptor
210210
//! Public key arguments for this descriptor (size 1 for PK, PKH, WPKH; any size of Multisig).
211211
const std::vector<std::unique_ptr<PubkeyProvider>> m_pubkey_args;
212212
//! 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;
214214
//! The string name of the descriptor function.
215215
const std::string m_name;
216216

@@ -221,23 +221,23 @@ class DescriptorImpl : public Descriptor
221221
/** A helper function to construct the scripts for this descriptor.
222222
*
223223
* 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.
225225
226226
* @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).
228228
* @param out A FlatSigningProvider to put scripts or public keys in that are necessary to the solver.
229229
* The script and pubkeys argument to this function are automatically added.
230230
* @return A vector with scriptPubKeys for this descriptor.
231231
*/
232232
virtual std::vector<CScript> MakeScripts(const std::vector<CPubKey>& pubkeys, const CScript* script, FlatSigningProvider& out) const = 0;
233233

234234
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) {}
236236

237237
bool IsSolvable() const override
238238
{
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;
241241
}
242242
return true;
243243
}
@@ -247,8 +247,8 @@ class DescriptorImpl : public Descriptor
247247
for (const auto& pubkey : m_pubkey_args) {
248248
if (pubkey->IsRange()) return true;
249249
}
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;
252252
}
253253
return false;
254254
}
@@ -268,10 +268,10 @@ class DescriptorImpl : public Descriptor
268268
}
269269
ret += std::move(tmp);
270270
}
271-
if (m_script_arg) {
271+
if (m_subdescriptor_arg) {
272272
if (pos++) ret += ",";
273273
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;
275275
ret += std::move(tmp);
276276
}
277277
out = std::move(ret) + ")";
@@ -311,9 +311,9 @@ class DescriptorImpl : public Descriptor
311311
}
312312
}
313313
std::vector<CScript> subscripts;
314-
if (m_script_arg) {
314+
if (m_subdescriptor_arg) {
315315
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;
317317
out = Merge(out, subprovider);
318318
}
319319

@@ -324,7 +324,7 @@ class DescriptorImpl : public Descriptor
324324
out.origins.emplace(entry.first.GetID(), std::move(entry.second));
325325
out.pubkeys.emplace(entry.first.GetID(), entry.first);
326326
}
327-
if (m_script_arg) {
327+
if (m_subdescriptor_arg) {
328328
for (const auto& subscript : subscripts) {
329329
out.scripts.emplace(CScriptID(subscript), subscript);
330330
std::vector<CScript> addscripts = MakeScripts(pubkeys, &subscript, out);

0 commit comments

Comments
 (0)