mirror of
https://github.com/monero-project/monero.git
synced 2024-12-23 03:59:33 +00:00
remove empty statements
Cleaning up a little around the code base.
This commit is contained in:
parent
6b2b1d6368
commit
c61abf87c0
11 changed files with 14 additions and 14 deletions
|
@ -218,7 +218,7 @@ namespace demo
|
||||||
|
|
||||||
s.m_subobj.m_str = "subszzzzzzzz";
|
s.m_subobj.m_str = "subszzzzzzzz";
|
||||||
s.m_list_of_self.push_back(s);
|
s.m_list_of_self.push_back(s);
|
||||||
s.m_storage_entry_int = epee::serialization::storage_entry(uint64_t(22222));;
|
s.m_storage_entry_int = epee::serialization::storage_entry(uint64_t(22222));
|
||||||
s.m_storage_entry_string = epee::serialization::storage_entry(std::string("sdsvsdvs"));
|
s.m_storage_entry_string = epee::serialization::storage_entry(std::string("sdsvsdvs"));
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
|
@ -202,7 +202,7 @@ namespace net_utils
|
||||||
|
|
||||||
virtual bool thread_init()
|
virtual bool thread_init()
|
||||||
{
|
{
|
||||||
return m_config.m_phandler->init_server_thread();;
|
return m_config.m_phandler->init_server_thread();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool thread_deinit()
|
virtual bool thread_deinit()
|
||||||
|
|
|
@ -237,7 +237,7 @@ namespace net_utils
|
||||||
return send_hook("Unknown command. Try list, nodes, config, fetch, version or quit\n");
|
return send_hook("Unknown command. Try list, nodes, config, fetch, version or quit\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return send_hook("Unknown command. Try list, nodes, config, fetch, version or quit\n");;
|
return send_hook("Unknown command. Try list, nodes, config, fetch, version or quit\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool handle_list_command()
|
bool handle_list_command()
|
||||||
|
|
|
@ -1986,7 +1986,7 @@ bool BlockchainLMDB::prune_worker(int mode, uint32_t pruning_seed)
|
||||||
const uint32_t log_stripes = tools::get_pruning_log_stripes(pruning_seed);
|
const uint32_t log_stripes = tools::get_pruning_log_stripes(pruning_seed);
|
||||||
if (log_stripes && log_stripes != CRYPTONOTE_PRUNING_LOG_STRIPES)
|
if (log_stripes && log_stripes != CRYPTONOTE_PRUNING_LOG_STRIPES)
|
||||||
throw0(DB_ERROR("Pruning seed not in range"));
|
throw0(DB_ERROR("Pruning seed not in range"));
|
||||||
pruning_seed = tools::get_pruning_stripe(pruning_seed);;
|
pruning_seed = tools::get_pruning_stripe(pruning_seed);
|
||||||
if (pruning_seed > (1ul << CRYPTONOTE_PRUNING_LOG_STRIPES))
|
if (pruning_seed > (1ul << CRYPTONOTE_PRUNING_LOG_STRIPES))
|
||||||
throw0(DB_ERROR("Pruning seed not in range"));
|
throw0(DB_ERROR("Pruning seed not in range"));
|
||||||
check_open();
|
check_open();
|
||||||
|
@ -3271,7 +3271,7 @@ output_data_t BlockchainLMDB::get_output_key(const uint64_t& amount, const uint6
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const pre_rct_outkey *okp = (const pre_rct_outkey *)v.mv_data;
|
const pre_rct_outkey *okp = (const pre_rct_outkey *)v.mv_data;
|
||||||
memcpy(&ret, &okp->data, sizeof(pre_rct_output_data_t));;
|
memcpy(&ret, &okp->data, sizeof(pre_rct_output_data_t));
|
||||||
if (include_commitmemt)
|
if (include_commitmemt)
|
||||||
ret.commitment = rct::zeroCommit(amount);
|
ret.commitment = rct::zeroCommit(amount);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5169,12 +5169,12 @@ bool Blockchain::for_all_transactions(std::function<bool(const crypto::hash&, co
|
||||||
|
|
||||||
bool Blockchain::for_all_outputs(std::function<bool(uint64_t amount, const crypto::hash &tx_hash, uint64_t height, size_t tx_idx)> f) const
|
bool Blockchain::for_all_outputs(std::function<bool(uint64_t amount, const crypto::hash &tx_hash, uint64_t height, size_t tx_idx)> f) const
|
||||||
{
|
{
|
||||||
return m_db->for_all_outputs(f);;
|
return m_db->for_all_outputs(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Blockchain::for_all_outputs(uint64_t amount, std::function<bool(uint64_t height)> f) const
|
bool Blockchain::for_all_outputs(uint64_t amount, std::function<bool(uint64_t height)> f) const
|
||||||
{
|
{
|
||||||
return m_db->for_all_outputs(amount, f);;
|
return m_db->for_all_outputs(amount, f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Blockchain::invalidate_block_template_cache()
|
void Blockchain::invalidate_block_template_cache()
|
||||||
|
|
|
@ -142,7 +142,7 @@ namespace cryptonote
|
||||||
uint64_t summary_amounts = 0;
|
uint64_t summary_amounts = 0;
|
||||||
for (size_t no = 0; no < out_amounts.size(); no++)
|
for (size_t no = 0; no < out_amounts.size(); no++)
|
||||||
{
|
{
|
||||||
crypto::key_derivation derivation = AUTO_VAL_INIT(derivation);;
|
crypto::key_derivation derivation = AUTO_VAL_INIT(derivation);
|
||||||
crypto::public_key out_eph_public_key = AUTO_VAL_INIT(out_eph_public_key);
|
crypto::public_key out_eph_public_key = AUTO_VAL_INIT(out_eph_public_key);
|
||||||
bool r = crypto::generate_key_derivation(miner_address.m_view_public_key, txkey.sec, derivation);
|
bool r = crypto::generate_key_derivation(miner_address.m_view_public_key, txkey.sec, derivation);
|
||||||
CHECK_AND_ASSERT_MES(r, false, "while creating outs: failed to generate_key_derivation(" << miner_address.m_view_public_key << ", " << txkey.sec << ")");
|
CHECK_AND_ASSERT_MES(r, false, "while creating outs: failed to generate_key_derivation(" << miner_address.m_view_public_key << ", " << txkey.sec << ")");
|
||||||
|
|
|
@ -69,7 +69,7 @@ uint16_t parse_public_rpc_port(const po::variables_map &vm)
|
||||||
const auto &restricted_rpc_port = cryptonote::core_rpc_server::arg_rpc_restricted_bind_port;
|
const auto &restricted_rpc_port = cryptonote::core_rpc_server::arg_rpc_restricted_bind_port;
|
||||||
if (!command_line::is_arg_defaulted(vm, restricted_rpc_port))
|
if (!command_line::is_arg_defaulted(vm, restricted_rpc_port))
|
||||||
{
|
{
|
||||||
rpc_port_str = command_line::get_arg(vm, restricted_rpc_port);;
|
rpc_port_str = command_line::get_arg(vm, restricted_rpc_port);
|
||||||
}
|
}
|
||||||
else if (command_line::get_arg(vm, cryptonote::core_rpc_server::arg_restricted_rpc))
|
else if (command_line::get_arg(vm, cryptonote::core_rpc_server::arg_restricted_rpc))
|
||||||
{
|
{
|
||||||
|
|
|
@ -173,7 +173,7 @@ static rct::key cross_vector_exponent8(size_t size, const std::vector<ge_p3> &A,
|
||||||
multiexp_data.resize(size*2 + (!!extra_point));
|
multiexp_data.resize(size*2 + (!!extra_point));
|
||||||
for (size_t i = 0; i < size; ++i)
|
for (size_t i = 0; i < size; ++i)
|
||||||
{
|
{
|
||||||
sc_mul(multiexp_data[i*2].scalar.bytes, a[ao+i].bytes, INV_EIGHT.bytes);;
|
sc_mul(multiexp_data[i*2].scalar.bytes, a[ao+i].bytes, INV_EIGHT.bytes);
|
||||||
multiexp_data[i*2].point = A[Ao+i];
|
multiexp_data[i*2].point = A[Ao+i];
|
||||||
sc_mul(multiexp_data[i*2+1].scalar.bytes, b[bo+i].bytes, INV_EIGHT.bytes);
|
sc_mul(multiexp_data[i*2+1].scalar.bytes, b[bo+i].bytes, INV_EIGHT.bytes);
|
||||||
if (scale)
|
if (scale)
|
||||||
|
|
|
@ -108,7 +108,7 @@ typedef cryptonote::simple_wallet sw;
|
||||||
epee::misc_utils::auto_scope_leave_caller scope_exit_handler = epee::misc_utils::create_scope_leave_handler([&](){ \
|
epee::misc_utils::auto_scope_leave_caller scope_exit_handler = epee::misc_utils::create_scope_leave_handler([&](){ \
|
||||||
/* m_idle_mutex is still locked here */ \
|
/* m_idle_mutex is still locked here */ \
|
||||||
m_auto_refresh_enabled.store(auto_refresh_enabled, std::memory_order_relaxed); \
|
m_auto_refresh_enabled.store(auto_refresh_enabled, std::memory_order_relaxed); \
|
||||||
m_suspend_rpc_payment_mining.store(false, std::memory_order_relaxed);; \
|
m_suspend_rpc_payment_mining.store(false, std::memory_order_relaxed); \
|
||||||
m_rpc_payment_checker.trigger(); \
|
m_rpc_payment_checker.trigger(); \
|
||||||
m_idle_cond.notify_one(); \
|
m_idle_cond.notify_one(); \
|
||||||
})
|
})
|
||||||
|
@ -1963,7 +1963,7 @@ bool simple_wallet::rpc_payment_info(const std::vector<std::string> &args)
|
||||||
if (expected)
|
if (expected)
|
||||||
message_writer() << tr("Credit discrepancy this session: ") << discrepancy << " (" << 100.0f * discrepancy / expected << "%)";
|
message_writer() << tr("Credit discrepancy this session: ") << discrepancy << " (" << 100.0f * discrepancy / expected << "%)";
|
||||||
float cph = credits_per_hash_found / (float)diff;
|
float cph = credits_per_hash_found / (float)diff;
|
||||||
message_writer() << tr("Difficulty: ") << diff << ", " << credits_per_hash_found << " " << tr("credits per hash found, ") << cph << " " << tr("credits/hash");;
|
message_writer() << tr("Difficulty: ") << diff << ", " << credits_per_hash_found << " " << tr("credits per hash found, ") << cph << " " << tr("credits/hash");
|
||||||
const boost::posix_time::ptime now = boost::posix_time::microsec_clock::universal_time();
|
const boost::posix_time::ptime now = boost::posix_time::microsec_clock::universal_time();
|
||||||
bool mining = (now - m_last_rpc_payment_mining_time).total_microseconds() < 1000000;
|
bool mining = (now - m_last_rpc_payment_mining_time).total_microseconds() < 1000000;
|
||||||
if (mining)
|
if (mining)
|
||||||
|
|
|
@ -82,7 +82,7 @@ namespace
|
||||||
|
|
||||||
lo = mul128(0x1111111111111111, 0x1111111111111111, &hi);
|
lo = mul128(0x1111111111111111, 0x1111111111111111, &hi);
|
||||||
ASSERT_EQ(lo, 0x0fedcba987654321);
|
ASSERT_EQ(lo, 0x0fedcba987654321);
|
||||||
ASSERT_EQ(hi, 0x0123456789abcdf0);;
|
ASSERT_EQ(hi, 0x0123456789abcdf0);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(mul128_with_carry_1_only, multiplies_correctly)
|
TEST(mul128_with_carry_1_only, multiplies_correctly)
|
||||||
|
|
|
@ -44,7 +44,7 @@ namespace
|
||||||
|
|
||||||
TEST(parse_tx_extra, handles_empty_extra)
|
TEST(parse_tx_extra, handles_empty_extra)
|
||||||
{
|
{
|
||||||
std::vector<uint8_t> extra;;
|
std::vector<uint8_t> extra;
|
||||||
std::vector<cryptonote::tx_extra_field> tx_extra_fields;
|
std::vector<cryptonote::tx_extra_field> tx_extra_fields;
|
||||||
ASSERT_TRUE(cryptonote::parse_tx_extra(extra, tx_extra_fields));
|
ASSERT_TRUE(cryptonote::parse_tx_extra(extra, tx_extra_fields));
|
||||||
ASSERT_TRUE(tx_extra_fields.empty());
|
ASSERT_TRUE(tx_extra_fields.empty());
|
||||||
|
|
Loading…
Reference in a new issue