From 53bcf8379a1279efb2904607f0e16419dd38a756 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Thu, 23 Jul 2015 16:14:17 +0200 Subject: [PATCH] fix and extend CBitcoinExtKeyBase template - fix Decode call (req. only one param) - add constructor for base58c->CExtKey --- src/base58.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/base58.h b/src/base58.h index d3967ec4e..9c6b54943 100644 --- a/src/base58.h +++ b/src/base58.h @@ -171,7 +171,7 @@ public: K GetKey() { K ret; - ret.Decode(&vchData[0], &vchData[Size]); + ret.Decode(&vchData[0]); return ret; } @@ -179,6 +179,10 @@ public: SetKey(key); } + CBitcoinExtKeyBase(const std::string& strBase58c) { + SetString(strBase58c.c_str(), Params().Base58Prefix(Type).size()); + } + CBitcoinExtKeyBase() {} };