mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 10:37:37 -07:00
commit
f2ea2afb77
@ -104,7 +104,7 @@ void log_stack_trace(const char *msg)
|
||||
|
||||
if (msg)
|
||||
LOG_PRINT2(log, msg, LOG_LEVEL_0);
|
||||
LOG_PRINT2(log, "Unwinded call stack:", LOG_LEVEL_0);
|
||||
LOG_PRINT2(log, "Unwound call stack:", LOG_LEVEL_0);
|
||||
if (unw_getcontext(&ctx) < 0) {
|
||||
LOG_PRINT2(log, "Failed to create unwind context", LOG_LEVEL_0);
|
||||
return;
|
||||
|
@ -1149,7 +1149,7 @@ bool Blockchain::create_block_template(block& b, const account_public_address& m
|
||||
uint8_t hf_version = m_hardfork->get_current_version();
|
||||
size_t max_outs = hf_version >= 4 ? 1 : 11;
|
||||
bool r = construct_miner_tx(height, median_size, already_generated_coins, txs_size, fee, miner_address, b.miner_tx, ex_nonce, max_outs, hf_version);
|
||||
CHECK_AND_ASSERT_MES(r, false, "Failed to construc miner tx, first chance");
|
||||
CHECK_AND_ASSERT_MES(r, false, "Failed to construct miner tx, first chance");
|
||||
size_t cumulative_size = txs_size + get_object_blobsize(b.miner_tx);
|
||||
#if defined(DEBUG_CREATE_BLOCK_TEMPLATE)
|
||||
LOG_PRINT_L1("Creating block template: miner tx size " << get_object_blobsize(b.miner_tx) <<
|
||||
@ -1159,7 +1159,7 @@ bool Blockchain::create_block_template(block& b, const account_public_address& m
|
||||
{
|
||||
r = construct_miner_tx(height, median_size, already_generated_coins, cumulative_size, fee, miner_address, b.miner_tx, ex_nonce, max_outs, hf_version);
|
||||
|
||||
CHECK_AND_ASSERT_MES(r, false, "Failed to construc miner tx, second chance");
|
||||
CHECK_AND_ASSERT_MES(r, false, "Failed to construct miner tx, second chance");
|
||||
size_t coinbase_blob_size = get_object_blobsize(b.miner_tx);
|
||||
if (coinbase_blob_size > cumulative_size - txs_size)
|
||||
{
|
||||
@ -1802,7 +1802,7 @@ bool Blockchain::find_blockchain_supplement(const std::list<crypto::hash>& qbloc
|
||||
auto gen_hash = m_db->get_block_hash_from_height(0);
|
||||
if(qblock_ids.back() != gen_hash)
|
||||
{
|
||||
LOG_PRINT_L1("Client sent wrong NOTIFY_REQUEST_CHAIN: genesis block missmatch: " << std::endl << "id: " << qblock_ids.back() << ", " << std::endl << "expected: " << gen_hash << "," << std::endl << " dropping connection");
|
||||
LOG_PRINT_L1("Client sent wrong NOTIFY_REQUEST_CHAIN: genesis block mismatch: " << std::endl << "id: " << qblock_ids.back() << ", " << std::endl << "expected: " << gen_hash << "," << std::endl << " dropping connection");
|
||||
m_db->block_txn_abort();
|
||||
return false;
|
||||
}
|
||||
|
@ -315,7 +315,7 @@ namespace cryptonote
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_ERROR("Attempted to use non-existant database type");
|
||||
LOG_ERROR("Attempted to use non-existent database type");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -716,7 +716,7 @@ namespace cryptonote
|
||||
crypto::hash tx_hash, tx_prefix_hash;
|
||||
if (!parse_and_validate_tx_from_blob(tx_blob, tx, tx_hash, tx_prefix_hash))
|
||||
{
|
||||
LOG_ERROR("Failed to parse relayed tranasction");
|
||||
LOG_ERROR("Failed to parse relayed transaction");
|
||||
return;
|
||||
}
|
||||
txs.push_back(std::make_pair(tx_hash, std::move(tx)));
|
||||
|
@ -553,7 +553,7 @@ namespace cryptonote
|
||||
//check that derivated key is equal with real output key
|
||||
if( !(in_ephemeral.pub == src_entr.outputs[src_entr.real_output].second.dest) )
|
||||
{
|
||||
LOG_ERROR("derived public key missmatch with output public key! "<< ENDL << "derived_key:"
|
||||
LOG_ERROR("derived public key mismatch with output public key! "<< ENDL << "derived_key:"
|
||||
<< string_tools::pod_to_hex(in_ephemeral.pub) << ENDL << "real output_public_key:"
|
||||
<< string_tools::pod_to_hex(src_entr.outputs[src_entr.real_output].second) );
|
||||
return false;
|
||||
|
@ -205,7 +205,7 @@ namespace cryptonote
|
||||
{
|
||||
//update transactions container
|
||||
auto txd_p = m_transactions.insert(transactions_container::value_type(id, txd));
|
||||
CHECK_AND_ASSERT_MES(txd_p.second, false, "intrnal error: transaction already exists at inserting in memorypool");
|
||||
CHECK_AND_ASSERT_MES(txd_p.second, false, "internal error: transaction already exists at inserting in memorypool");
|
||||
txd_p.first->second.blob_size = blob_size;
|
||||
txd_p.first->second.kept_by_block = kept_by_block;
|
||||
txd_p.first->second.fee = fee;
|
||||
|
@ -143,23 +143,23 @@ namespace cryptonote
|
||||
double get_avg_block_size();
|
||||
boost::circular_buffer<size_t> m_avg_buffer = boost::circular_buffer<size_t>(10);
|
||||
|
||||
template<class t_parametr>
|
||||
bool post_notify(typename t_parametr::request& arg, cryptonote_connection_context& context)
|
||||
template<class t_parameter>
|
||||
bool post_notify(typename t_parameter::request& arg, cryptonote_connection_context& context)
|
||||
{
|
||||
LOG_PRINT_L2("[" << epee::net_utils::print_connection_context_short(context) << "] post " << typeid(t_parametr).name() << " -->");
|
||||
LOG_PRINT_L2("[" << epee::net_utils::print_connection_context_short(context) << "] post " << typeid(t_parameter).name() << " -->");
|
||||
std::string blob;
|
||||
epee::serialization::store_t_to_binary(arg, blob);
|
||||
//handler_response_blocks_now(blob.size()); // XXX
|
||||
return m_p2p->invoke_notify_to_peer(t_parametr::ID, blob, context);
|
||||
return m_p2p->invoke_notify_to_peer(t_parameter::ID, blob, context);
|
||||
}
|
||||
|
||||
template<class t_parametr>
|
||||
bool relay_post_notify(typename t_parametr::request& arg, cryptonote_connection_context& exlude_context)
|
||||
template<class t_parameter>
|
||||
bool relay_post_notify(typename t_parameter::request& arg, cryptonote_connection_context& exclude_context)
|
||||
{
|
||||
LOG_PRINT_L2("[" << epee::net_utils::print_connection_context_short(exlude_context) << "] post relay " << typeid(t_parametr).name() << " -->");
|
||||
LOG_PRINT_L2("[" << epee::net_utils::print_connection_context_short(exclude_context) << "] post relay " << typeid(t_parameter).name() << " -->");
|
||||
std::string arg_buff;
|
||||
epee::serialization::store_t_to_binary(arg, arg_buff);
|
||||
return m_p2p->relay_notify_to_all(t_parametr::ID, arg_buff, exlude_context);
|
||||
return m_p2p->relay_notify_to_all(t_parameter::ID, arg_buff, exclude_context);
|
||||
}
|
||||
|
||||
virtual std::ofstream& get_logreq() const ;
|
||||
|
@ -543,7 +543,7 @@ namespace nodetool
|
||||
} else if (result == 2) {
|
||||
LOG_PRINT_L0("IGD was found but reported as not connected.");
|
||||
} else if (result == 3) {
|
||||
LOG_PRINT_L0("UPnP device was found but not recoginzed as IGD.");
|
||||
LOG_PRINT_L0("UPnP device was found but not recognized as IGD.");
|
||||
} else {
|
||||
LOG_ERROR("UPNP_GetValidIGD returned an unknown result code.");
|
||||
}
|
||||
@ -1485,10 +1485,10 @@ namespace nodetool
|
||||
template<class t_payload_net_handler>
|
||||
bool node_server<t_payload_net_handler>::log_peerlist()
|
||||
{
|
||||
std::list<peerlist_entry> pl_wite;
|
||||
std::list<peerlist_entry> pl_white;
|
||||
std::list<peerlist_entry> pl_gray;
|
||||
m_peerlist.get_peerlist_full(pl_gray, pl_wite);
|
||||
LOG_PRINT_L0(ENDL << "Peerlist white:" << ENDL << print_peerlist_to_string(pl_wite) << ENDL << "Peerlist gray:" << ENDL << print_peerlist_to_string(pl_gray) );
|
||||
m_peerlist.get_peerlist_full(pl_gray, pl_white);
|
||||
LOG_PRINT_L0(ENDL << "Peerlist white:" << ENDL << print_peerlist_to_string(pl_white) << ENDL << "Peerlist gray:" << ENDL << print_peerlist_to_string(pl_gray) );
|
||||
return true;
|
||||
}
|
||||
//-----------------------------------------------------------------------------------
|
||||
|
@ -526,7 +526,7 @@ bool WalletImpl::refresh()
|
||||
|
||||
void WalletImpl::refreshAsync()
|
||||
{
|
||||
LOG_PRINT_L3(__FUNCTION__ << ": Refreshing asyncronously..");
|
||||
LOG_PRINT_L3(__FUNCTION__ << ": Refreshing asynchronously..");
|
||||
clearStatus();
|
||||
m_refreshCV.notify_one();
|
||||
}
|
||||
|
@ -2348,7 +2348,7 @@ void wallet2::load(const std::string& wallet_, const std::string& password)
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
void wallet2::check_genesis(const crypto::hash& genesis_hash) const {
|
||||
std::string what("Genesis block missmatch. You probably use wallet without testnet flag with blockchain from test network or vice versa");
|
||||
std::string what("Genesis block mismatch. You probably use wallet without testnet flag with blockchain from test network or vice versa");
|
||||
|
||||
THROW_WALLET_EXCEPTION_IF(genesis_hash != m_blockchain[0], error::wallet_internal_error, what);
|
||||
}
|
||||
@ -3856,12 +3856,12 @@ static size_t estimate_rct_tx_size(int n_inputs, int mixin, int n_outputs)
|
||||
return size;
|
||||
}
|
||||
|
||||
std::vector<size_t> wallet2::pick_prefered_rct_inputs(uint64_t needed_money) const
|
||||
std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money) const
|
||||
{
|
||||
std::vector<size_t> picks;
|
||||
float current_output_relatdness = 1.0f;
|
||||
|
||||
LOG_PRINT_L2("pick_prefered_rct_inputs: needed_money " << print_money(needed_money));
|
||||
LOG_PRINT_L2("pick_preferred_rct_inputs: needed_money " << print_money(needed_money));
|
||||
|
||||
// try to find a rct input of enough size
|
||||
for (size_t i = 0; i < m_transfers.size(); ++i)
|
||||
@ -4024,7 +4024,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
|
||||
// this is used to build a tx that's 1 or 2 inputs, and 2 outputs, which
|
||||
// will get us a known fee.
|
||||
uint64_t estimated_fee = calculate_fee(fee_per_kb, estimate_rct_tx_size(2, fake_outs_count + 1, 2), fee_multiplier);
|
||||
prefered_inputs = pick_prefered_rct_inputs(needed_money + estimated_fee);
|
||||
prefered_inputs = pick_preferred_rct_inputs(needed_money + estimated_fee);
|
||||
if (!prefered_inputs.empty())
|
||||
{
|
||||
string s;
|
||||
|
@ -595,7 +595,7 @@ namespace tools
|
||||
uint64_t get_dynamic_per_kb_fee_estimate();
|
||||
uint64_t get_per_kb_fee();
|
||||
float get_output_relatedness(const transfer_details &td0, const transfer_details &td1) const;
|
||||
std::vector<size_t> pick_prefered_rct_inputs(uint64_t needed_money) const;
|
||||
std::vector<size_t> pick_preferred_rct_inputs(uint64_t needed_money) const;
|
||||
void set_spent(size_t idx, uint64_t height);
|
||||
void set_unspent(size_t idx);
|
||||
template<typename entry>
|
||||
|
@ -558,7 +558,7 @@ namespace tools
|
||||
if(!epee::string_tools::parse_hexstr_to_binbuff(req.payment_id, payment_id_blob))
|
||||
{
|
||||
er.code = WALLET_RPC_ERROR_CODE_WRONG_PAYMENT_ID;
|
||||
er.message = "Payment ID has invald format";
|
||||
er.message = "Payment ID has invalid format";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user