diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-04-30 15:32:40 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-05-04 06:53:32 +0200 |
commit | fa05dddc42770809fdae4d9c35155f8117960019 (patch) | |
tree | daaf2d3f9598f89b8c3a8230c765f7a4df1cd9d0 /src/script/descriptor.cpp | |
parent | fabb6dfe6e734eadd91448122f2ce8c1612c39a6 (diff) |
refactor: Use CPubKey vector constructor where possible
Diffstat (limited to 'src/script/descriptor.cpp')
-rw-r--r-- | src/script/descriptor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/descriptor.cpp b/src/script/descriptor.cpp index e433ed6764..b54ba204f0 100644 --- a/src/script/descriptor.cpp +++ b/src/script/descriptor.cpp @@ -1098,7 +1098,7 @@ std::unique_ptr<DescriptorImpl> InferScript(const CScript& script, ParseScriptCo TxoutType txntype = Solver(script, data); if (txntype == TxoutType::PUBKEY) { - CPubKey pubkey(data[0].begin(), data[0].end()); + CPubKey pubkey(data[0]); if (pubkey.IsValid()) { return std::make_unique<PKDescriptor>(InferPubkey(pubkey, ctx, provider)); } @@ -1122,7 +1122,7 @@ std::unique_ptr<DescriptorImpl> InferScript(const CScript& script, ParseScriptCo if (txntype == TxoutType::MULTISIG) { std::vector<std::unique_ptr<PubkeyProvider>> providers; for (size_t i = 1; i + 1 < data.size(); ++i) { - CPubKey pubkey(data[i].begin(), data[i].end()); + CPubKey pubkey(data[i]); providers.push_back(InferPubkey(pubkey, ctx, provider)); } return std::make_unique<MultisigDescriptor>((int)data[0][0], std::move(providers)); |