aboutsummaryrefslogtreecommitdiff
path: root/src/script/descriptor.cpp
diff options
context:
space:
mode:
authorMarcoFalke <[email protected]>2020-06-24 14:24:03 -0400
committerMarcoFalke <[email protected]>2020-06-24 14:24:14 -0400
commit532b134cb0d0887a14fe79c2a2604498921caf6f (patch)
tree0aa7480acb3fa0162f49ab989bd40a8274acffe0 /src/script/descriptor.cpp
parentMerge #19357: doc: add release note for bitcoin-cli -generate (diff)
parentrefactor: Replace HexStr(o.begin(), o.end()) with HexStr(o) (diff)
downloaddiscoin-532b134cb0d0887a14fe79c2a2604498921caf6f.tar.xz
discoin-532b134cb0d0887a14fe79c2a2604498921caf6f.zip
Merge #19373: refactor: Replace HexStr(o.begin(), o.end()) with HexStr(o)
bd93e32292c96b671e71223032ff8f660ce27c5d refactor: Replace HexStr(o.begin(), o.end()) with HexStr(o) (Wladimir J. van der Laan) Pull request description: HexStr can be called with anything that bas `begin()` and `end()` functions, so clean up the redundant calls. (context: I tried to convert `HexStr` to use span, but this turns out to be somewhat more involved than I thought, because of the limitation to pre-c++17 Span lacking iterator-based constructor) . This commit is a first step which stands on its own though) ACKs for top commit: jonatack: ACK bd93e32292c96b671e71223032ff8f660ce27c5d troygiorshev: ACK bd93e32292c96b671e71223032ff8f660ce27c5d MarcoFalke: review ACK bd93e32292c96b671e71223032ff8f660ce27c5d 🔌 Tree-SHA512: 7e4c9d0259b8d23271d233095f1c51db1ee021e865361d74c05c10dd5129aa6d34a243323e2b4596d648e2d7b25c7ebdee37a3e4f99a27883cb4c3cd26432b08
Diffstat (limited to 'src/script/descriptor.cpp')
-rw-r--r--src/script/descriptor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/descriptor.cpp b/src/script/descriptor.cpp
index 7a5421ab6..2634d3ad4 100644
--- a/src/script/descriptor.cpp
+++ b/src/script/descriptor.cpp
@@ -235,7 +235,7 @@ public:
}
bool IsRange() const override { return false; }
size_t GetSize() const override { return m_pubkey.size(); }
- std::string ToString() const override { return HexStr(m_pubkey.begin(), m_pubkey.end()); }
+ std::string ToString() const override { return HexStr(m_pubkey); }
bool ToPrivateString(const SigningProvider& arg, std::string& ret) const override
{
CKey key;
@@ -583,7 +583,7 @@ class RawDescriptor final : public DescriptorImpl
{
const CScript m_script;
protected:
- std::string ToStringExtra() const override { return HexStr(m_script.begin(), m_script.end()); }
+ std::string ToStringExtra() const override { return HexStr(m_script); }
std::vector<CScript> MakeScripts(const std::vector<CPubKey>&, const CScript*, FlatSigningProvider&) const override { return Vector(m_script); }
public:
RawDescriptor(CScript script) : DescriptorImpl({}, {}, "raw"), m_script(std::move(script)) {}