diff options
Diffstat (limited to 'src/base58.h')
-rw-r--r-- | src/base58.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/base58.h b/src/base58.h index 787979c827..90014b9496 100644 --- a/src/base58.h +++ b/src/base58.h @@ -146,7 +146,10 @@ public: K GetKey() { K ret; - ret.Decode(&vchData[0], &vchData[Size]); + if (vchData.size() == Size) { + //if base58 encouded data not holds a ext key, return a !IsValid() key + ret.Decode(&vchData[0]); + } return ret; } @@ -154,6 +157,10 @@ public: SetKey(key); } + CBitcoinExtKeyBase(const std::string& strBase58c) { + SetString(strBase58c.c_str(), Params().Base58Prefix(Type).size()); + } + CBitcoinExtKeyBase() {} }; |