git://git.novaco.in
/
novacoin.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Demystify a few magic numbers.
[novacoin.git]
/
src
/
base58.h
diff --git
a/src/base58.h
b/src/base58.h
index
580bd3f
..
c2729d4
100644
(file)
--- a/
src/base58.h
+++ b/
src/base58.h
@@
-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;