Skip to content

Commit

Permalink
libzendoo (mc-cryptolib) update
Browse files Browse the repository at this point in the history
  • Loading branch information
a-petrini committed Nov 15, 2023
1 parent cbcefbd commit c7d6488
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions depends/packages/libzendoo.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ $(package)_version=0.5.0
$(package)_download_path=https://github.com/HorizenOfficial/zendoo-mc-cryptolib/archive/
$(package)_file_name=$(package)-$($(package)_git_commit).tar.gz
$(package)_download_file=$($(package)_git_commit).tar.gz
$(package)_sha256_hash=b0b9d47a2a84a3fcc682658bc8a4afbc691277c31944855ee1a0d16eac4a0c5b
$(package)_git_commit=21edcf2a03feed2730da410ea2d446a2223954c9
$(package)_sha256_hash=accbcc85ad6cd6f4008da33b9393435f5c22c3535bec9c9f8f9f18b0031069c0
$(package)_git_commit=25c13b91a274ecb5d226032e6f6a6328b6d43e39
$(package)_dependencies=rust
$(package)_patches=cargo.config mcTest-compiler-flag.patch

Expand Down
12 changes: 6 additions & 6 deletions src/sc/sidechain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ bool Sidechain::InitZendoo()
const std::string cfg_path = GetMcCryptoConfigFile().string();
#endif

if (!cfg_path.empty())
zendoo_init(
// Enable mc-crypto logger only if we explicitly request that
if (GetBoolArg("-enable_mc_crypto_logger", false))
zendoo_init_logger(
reinterpret_cast<path_char_t const*>(cfg_path.c_str()),
cfg_path.size(),
&ret_code
);

if (ret_code != CctpErrorCode::OK) {
// mc-crypto returns CctpErrorCode::LoggerInitializationError if it cannot open log4rs configuration file.
// This is a non-blocking issue and zend can continue with its startup
if (ret_code == CctpErrorCode::InitializationError) {
LogPrintf("%s():%d - Error initializing mc-crypto logger - errCode [%d]\n", __func__, __LINE__, ret_code);
return true;
if (ret_code == CctpErrorCode::LoggerInitializationError) {
return error("%s():%d - Error initializing mc-crypto logger - errCode [%d]\n", __func__, __LINE__, ret_code);
}
// and this condition manages other errors due to logger init
return error("%s():%d - ERROR: Failed initializing Zendoo library, err %d\n",
__func__, __LINE__, ret_code);
}
Expand Down

0 comments on commit c7d6488

Please sign in to comment.