Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Daemon compatibility to GCC8, OpenSSL v.1.1, C++11
  • Loading branch information
sats0k committed Mar 2, 2019
1 parent 9f8ca35 commit 483be9a
Show file tree
Hide file tree
Showing 22 changed files with 448 additions and 90 deletions.
4 changes: 2 additions & 2 deletions src/alert.cpp
Expand Up @@ -48,8 +48,8 @@ std::string CUnsignedAlert::ToString() const
return strprintf(
"CAlert(\n"
" nVersion = %d\n"
" nRelayUntil = %"PRI64d"\n"
" nExpiration = %"PRI64d"\n"
" nRelayUntil = %" PRI64d"\n"
" nExpiration = %" PRI64d"\n"
" nID = %d\n"
" nCancel = %d\n"
" setCancel = %s\n"
Expand Down
8 changes: 8 additions & 0 deletions src/base58.h
Expand Up @@ -49,7 +49,11 @@ inline std::string EncodeBase58(const unsigned char* pbegin, const unsigned char
CBigNum rem;
while (bn > bn0)
{
#if OPENSSL_VERSION_NUMBER < 0x10100000L
if (!BN_div(&dv, &rem, &bn, &bn58, pctx))
#else
if (!BN_div(dv.get(), rem.get(), bn.cget(), bn58.cget(), pctx))
#endif
throw bignum_error("EncodeBase58 : BN_div failed");
bn = dv;
unsigned int c = rem.getulong();
Expand Down Expand Up @@ -96,7 +100,11 @@ inline bool DecodeBase58(const char* psz, std::vector<unsigned char>& vchRet)
break;
}
bnChar.setulong(p1 - pszBase58);
#if OPENSSL_VERSION_NUMBER < 0x10100000L
if (!BN_mul(&bn, &bn, &bn58, pctx))
#else
if (!BN_mul(bn.get(), bn.cget(), bn58.cget(), pctx))
#endif
throw bignum_error("DecodeBase58 : BN_mul failed");
bn += bnChar;
}
Expand Down

0 comments on commit 483be9a

Please sign in to comment.