Demystify a few magic numbers.

This commit is contained in:
Doug Huff
2011-06-06 12:47:19 -05:00
parent 352b4ea5b9
commit a9d3af8821
2 changed files with 5 additions and 0 deletions

View File

@@ -38,6 +38,8 @@ inline std::string EncodeBase58(const unsigned char* pbegin, const unsigned char
// Convert bignum to std::string
std::string str;
// Expected size increase from base58 conversion is approximately 137%
// use 138% to be safe
str.reserve((pend - pbegin) * 138 / 100 + 1);
CBigNum dv;
CBigNum rem;