diff options
| author | Chris Moore <[email protected]> | 2012-04-12 13:13:08 -0700 |
|---|---|---|
| committer | Chris Moore <[email protected]> | 2012-04-12 13:13:08 -0700 |
| commit | b3a6e613fc4c3261ff5a28f77b11398e60dca82a (patch) | |
| tree | 47160cbd0caaa05e681fc83bde2afea47e6cbe86 /src/base58.h | |
| parent | Merge pull request #1041 from gavinandresen/listtransactionsfix (diff) | |
| download | discoin-b3a6e613fc4c3261ff5a28f77b11398e60dca82a.tar.xz discoin-b3a6e613fc4c3261ff5a28f77b11398e60dca82a.zip | |
CBitcoinSecret::SetString() now calls IsValid() to make sure it was passed something with the correct version.
Diffstat (limited to 'src/base58.h')
| -rw-r--r-- | src/base58.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/base58.h b/src/base58.h index 755e34c41..7fefbc5d7 100644 --- a/src/base58.h +++ b/src/base58.h @@ -396,6 +396,16 @@ public: return fExpectTestNet == fTestNet && (vchData.size() == 32 || (vchData.size() == 33 && vchData[32] == 1)); } + bool SetString(const char* pszSecret) + { + return CBase58Data::SetString(pszSecret) && IsValid(); + } + + bool SetString(const std::string& strSecret) + { + return SetString(strSecret.c_str()); + } + CBitcoinSecret(const CSecret& vchSecret, bool fCompressed) { SetSecret(vchSecret, fCompressed); |