mirror of
https://github.com/monero-project/monero.git
synced 2025-12-14 18:22:23 -05:00
Subaddresses
This commit is contained in:
parent
86e9de588c
commit
53ad5a0f42
66 changed files with 3224 additions and 868 deletions
|
|
@ -252,20 +252,18 @@ bool t_command_parser_executor::start_mining(const std::vector<std::string>& arg
|
|||
return true;
|
||||
}
|
||||
|
||||
cryptonote::account_public_address adr;
|
||||
bool has_payment_id;
|
||||
crypto::hash8 payment_id;
|
||||
cryptonote::address_parse_info info;
|
||||
bool testnet = false;
|
||||
if(!cryptonote::get_account_integrated_address_from_str(adr, has_payment_id, payment_id, false, args.front()))
|
||||
if(!cryptonote::get_account_address_from_str(info, false, args.front()))
|
||||
{
|
||||
if(!cryptonote::get_account_integrated_address_from_str(adr, has_payment_id, payment_id, true, args.front()))
|
||||
if(!cryptonote::get_account_address_from_str(info, true, args.front()))
|
||||
{
|
||||
bool dnssec_valid;
|
||||
std::string address_str = tools::dns_utils::get_account_address_as_str_from_url(args.front(), dnssec_valid,
|
||||
[](const std::string &url, const std::vector<std::string> &addresses, bool dnssec_valid){return addresses[0];});
|
||||
if(!cryptonote::get_account_integrated_address_from_str(adr, has_payment_id, payment_id, false, address_str))
|
||||
if(!cryptonote::get_account_address_from_str(info, false, address_str))
|
||||
{
|
||||
if(!cryptonote::get_account_integrated_address_from_str(adr, has_payment_id, payment_id, true, address_str))
|
||||
if(!cryptonote::get_account_address_from_str(info, true, address_str))
|
||||
{
|
||||
std::cout << "target account address has wrong format" << std::endl;
|
||||
return true;
|
||||
|
|
@ -281,6 +279,11 @@ bool t_command_parser_executor::start_mining(const std::vector<std::string>& arg
|
|||
testnet = true;
|
||||
}
|
||||
}
|
||||
if (info.is_subaddress)
|
||||
{
|
||||
tools::fail_msg_writer() << "subaddress for mining reward is not yet supported!" << std::endl;
|
||||
return true;
|
||||
}
|
||||
if(testnet)
|
||||
std::cout << "Mining to a testnet address, make sure this is intentional!" << std::endl;
|
||||
uint64_t threads_count = 1;
|
||||
|
|
@ -307,7 +310,7 @@ bool t_command_parser_executor::start_mining(const std::vector<std::string>& arg
|
|||
threads_count = (ok && 0 < threads_count) ? threads_count : 1;
|
||||
}
|
||||
|
||||
m_executor.start_mining(adr, threads_count, testnet, do_background_mining, ignore_battery);
|
||||
m_executor.start_mining(info.address, threads_count, testnet, do_background_mining, ignore_battery);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1014,7 +1014,7 @@ bool t_rpc_command_executor::print_transaction_pool_stats() {
|
|||
bool t_rpc_command_executor::start_mining(cryptonote::account_public_address address, uint64_t num_threads, bool testnet, bool do_background_mining, bool ignore_battery) {
|
||||
cryptonote::COMMAND_RPC_START_MINING::request req;
|
||||
cryptonote::COMMAND_RPC_START_MINING::response res;
|
||||
req.miner_address = cryptonote::get_account_address_as_str(testnet, address);
|
||||
req.miner_address = cryptonote::get_account_address_as_str(testnet, false, address);
|
||||
req.threads_count = num_threads;
|
||||
req.do_background_mining = do_background_mining;
|
||||
req.ignore_battery = ignore_battery;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue