forked from lthn/blockchain
Merge branch 'develop' into autodoc
This commit is contained in:
commit
e51e56e825
6 changed files with 32 additions and 8 deletions
|
|
@ -1910,7 +1910,11 @@ bool blockchain_storage::handle_alternative_block(const block& b, const crypto::
|
||||||
std::stringstream ss_pow_pos_info;
|
std::stringstream ss_pow_pos_info;
|
||||||
if (pos_block)
|
if (pos_block)
|
||||||
{
|
{
|
||||||
ss_pow_pos_info << "PoS:\t" << abei.stake_hash << ", stake amount: " << print_money(pos_amount) << ", final_difficulty: " << pos_diff_final;
|
ss_pow_pos_info << "PoS:\t" << abei.stake_hash << ", stake amount: ";
|
||||||
|
if (abei.bl.miner_tx.version >= TRANSACTION_VERSION_POST_HF4)
|
||||||
|
ss_pow_pos_info << "hidden";
|
||||||
|
else
|
||||||
|
ss_pow_pos_info << print_money_brief(pos_amount) << ", final_difficulty: " << pos_diff_final;
|
||||||
proof = abei.stake_hash;
|
proof = abei.stake_hash;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright (c) 2022 Zano Project
|
// Copyright (c) 2022-2024 Zano Project
|
||||||
// Distributed under the MIT/X11 software license, see the accompanying
|
// Distributed under the MIT/X11 software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
//
|
//
|
||||||
|
|
@ -56,7 +56,7 @@ namespace currency
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
if (this->zarcanum /* && td.is_zc() */)
|
if (this->zarcanum)
|
||||||
{
|
{
|
||||||
crypto::mp::uint256_t lhs;
|
crypto::mp::uint256_t lhs;
|
||||||
crypto::mp::uint512_t rhs;
|
crypto::mp::uint512_t rhs;
|
||||||
|
|
@ -70,7 +70,7 @@ namespace currency
|
||||||
const boost::multiprecision::uint256_t d_mp = lhs / (crypto::c_zarcanum_z_coeff_mp * this->stake_amount) + 1;
|
const boost::multiprecision::uint256_t d_mp = lhs / (crypto::c_zarcanum_z_coeff_mp * this->stake_amount) + 1;
|
||||||
const boost::multiprecision::uint256_t ba = d_mp * crypto::c_zarcanum_z_coeff_mp * this->stake_amount - lhs;
|
const boost::multiprecision::uint256_t ba = d_mp * crypto::c_zarcanum_z_coeff_mp * this->stake_amount - lhs;
|
||||||
const boost::multiprecision::uint256_t l_div_z_D = this->z_l_div_z_D / crypto::c_zarcanum_z_coeff_mp;
|
const boost::multiprecision::uint256_t l_div_z_D = this->z_l_div_z_D / crypto::c_zarcanum_z_coeff_mp;
|
||||||
LOG_PRINT_GREEN("Found Zarcanum kernel: amount: " << currency::print_money_brief(this->stake_amount) << /* ", gindex: " << td.m_global_output_index << */ ENDL
|
LOG_PRINT_GREEN("Found Zarcanum kernel: amount: " << currency::print_money_brief(this->stake_amount) << ENDL
|
||||||
<< "difficulty: " << this->basic_diff << ENDL
|
<< "difficulty: " << this->basic_diff << ENDL
|
||||||
<< "kernel info: " << ENDL
|
<< "kernel info: " << ENDL
|
||||||
<< print_stake_kernel_info(this->sk)
|
<< print_stake_kernel_info(this->sk)
|
||||||
|
|
@ -78,9 +78,8 @@ namespace currency
|
||||||
<< "lhs: 0x" << crypto::scalar_t(lhs).to_string_as_hex_number() << " = 0x" << std::hex << d_mp << " * 2^64 * " << this->stake_amount << " - 0x" << std::hex << ba << ENDL
|
<< "lhs: 0x" << crypto::scalar_t(lhs).to_string_as_hex_number() << " = 0x" << std::hex << d_mp << " * 2^64 * " << this->stake_amount << " - 0x" << std::hex << ba << ENDL
|
||||||
<< "rhs: 0x" << crypto::scalar_t(rhs).to_string_as_hex_number() << ENDL
|
<< "rhs: 0x" << crypto::scalar_t(rhs).to_string_as_hex_number() << ENDL
|
||||||
<< "d: 0x" << std::hex << d_mp << ENDL
|
<< "d: 0x" << std::hex << d_mp << ENDL
|
||||||
<< "l / floor(z * D): 0x" << std::hex << l_div_z_D
|
<< "floor(l / z * D): 0x" << std::hex << l_div_z_D
|
||||||
, LOG_LEVEL_0);
|
, LOG_LEVEL_0);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -301,6 +301,26 @@ QString MainWindow::call_rpc(const QString& params)
|
||||||
return QString::fromStdString(response_info.m_body);
|
return QString::fromStdString(response_info.m_body);
|
||||||
CATCH_ENTRY_FAIL_API_RESPONCE();
|
CATCH_ENTRY_FAIL_API_RESPONCE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString MainWindow::call_wallet_rpc(const QString& wallet_id_str, const QString& params)
|
||||||
|
{
|
||||||
|
TRY_ENTRY();
|
||||||
|
|
||||||
|
if (!m_backend.is_core_initialized())
|
||||||
|
{
|
||||||
|
epee::json_rpc::error_response rsp;
|
||||||
|
rsp.jsonrpc = "2.0";
|
||||||
|
rsp.error.code = -1;
|
||||||
|
rsp.error.message = API_RETURN_CODE_CORE_BUSY;
|
||||||
|
return QString::fromStdString(epee::serialization::store_t_to_json(static_cast<epee::json_rpc::error_response&>(rsp)));
|
||||||
|
}
|
||||||
|
|
||||||
|
uint64_t wallet_id = std::stoull(wallet_id_str.toStdString());
|
||||||
|
|
||||||
|
return QString::fromStdString(m_backend.invoke(wallet_id, params.toStdString()));
|
||||||
|
CATCH_ENTRY_FAIL_API_RESPONCE();
|
||||||
|
}
|
||||||
|
|
||||||
QString MainWindow::get_default_fee(const QString& param)
|
QString MainWindow::get_default_fee(const QString& param)
|
||||||
{
|
{
|
||||||
TRY_ENTRY();
|
TRY_ENTRY();
|
||||||
|
|
|
||||||
|
|
@ -198,6 +198,7 @@ public:
|
||||||
QString request_dummy(const QString& param);
|
QString request_dummy(const QString& param);
|
||||||
|
|
||||||
QString call_rpc(const QString& params);
|
QString call_rpc(const QString& params);
|
||||||
|
QString call_wallet_rpc(const QString& wallet_id, const QString& params);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void quit_requested(const QString str);
|
void quit_requested(const QString str);
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit f8e9556fbaccd49841ce91afc3c90c8e3142ac95
|
Subproject commit d593aa3485395d7cc0415519dc1fc079de82e0ea
|
||||||
|
|
@ -8,6 +8,6 @@
|
||||||
#define PROJECT_REVISION "0"
|
#define PROJECT_REVISION "0"
|
||||||
#define PROJECT_VERSION PROJECT_MAJOR_VERSION "." PROJECT_MINOR_VERSION "." PROJECT_REVISION
|
#define PROJECT_VERSION PROJECT_MAJOR_VERSION "." PROJECT_MINOR_VERSION "." PROJECT_REVISION
|
||||||
|
|
||||||
#define PROJECT_VERSION_BUILD_NO 278
|
#define PROJECT_VERSION_BUILD_NO 279
|
||||||
#define PROJECT_VERSION_BUILD_NO_STR STRINGIFY_EXPAND(PROJECT_VERSION_BUILD_NO)
|
#define PROJECT_VERSION_BUILD_NO_STR STRINGIFY_EXPAND(PROJECT_VERSION_BUILD_NO)
|
||||||
#define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO_STR "[" BUILD_COMMIT_ID "]"
|
#define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO_STR "[" BUILD_COMMIT_ID "]"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue