forked from lthn/blockchain
Merge branch 'master' into develop
This commit is contained in:
commit
09c42ed0b4
2 changed files with 16 additions and 13 deletions
|
|
@ -135,7 +135,7 @@ namespace
|
|||
const command_line::arg_descriptor<int> arg_daemon_port ("daemon-port", "Use daemon instance at port <arg> instead of default", 0);
|
||||
const command_line::arg_descriptor<bool> arg_do_pos_mining ( "do-pos-mining", "Do PoS mining", false);
|
||||
const command_line::arg_descriptor<std::string> arg_pos_mining_reward_address ( "pos-mining-reward-address", "Block reward will be sent to the giving address if specified", "" );
|
||||
const command_line::arg_descriptor<std::string> arg_pos_mining_defrag ( "pos-mining-defrag", "<min_outs_cnt,max_outs_cnt,amount_limit> Generate defragmentation tx for small outputs each time a PoS block is found. Default params: " STR(DEFAULT_WALLET_MIN_UTXO_COUNT_FOR_DEFRAGMENTATION_TX) "," STR(DEFAULT_WALLET_MAX_UTXO_COUNT_FOR_DEFRAGMENTATION_TX) ",1.0", "" );
|
||||
const command_line::arg_descriptor<std::string> arg_pos_mining_defrag ( "pos-mining-defrag", "<min_outs_cnt>,<max_outs_cnt>,<amount_limit>|disable Generate defragmentation tx for small outputs each time a PoS block is found. Disabled by default. If empty string given, the default params used: " STR(DEFAULT_WALLET_MIN_UTXO_COUNT_FOR_DEFRAGMENTATION_TX) "," STR(DEFAULT_WALLET_MAX_UTXO_COUNT_FOR_DEFRAGMENTATION_TX) ",1.0", "disable" );
|
||||
const command_line::arg_descriptor<std::string> arg_restore_wallet ( "restore-wallet", "Restore wallet from seed phrase or tracking seed and save it to <arg>", "" );
|
||||
const command_line::arg_descriptor<bool> arg_offline_mode ( "offline-mode", "Don't connect to daemon, work offline (for cold-signing process)");
|
||||
const command_line::arg_descriptor<std::string> arg_scan_for_wallet ( "scan-for-wallet", "");
|
||||
|
|
@ -2660,7 +2660,7 @@ int main(int argc, char* argv[])
|
|||
command_line::add_arg(desc_general, command_line::arg_help);
|
||||
command_line::add_arg(desc_general, command_line::arg_version);
|
||||
|
||||
po::options_description desc_params("Wallet options");
|
||||
po::options_description desc_params("Wallet options", 160);
|
||||
command_line::add_arg(desc_params, arg_wallet_file);
|
||||
command_line::add_arg(desc_params, arg_generate_new_wallet);
|
||||
command_line::add_arg(desc_params, arg_generate_new_auditable_wallet);
|
||||
|
|
@ -2729,7 +2729,7 @@ int main(int argc, char* argv[])
|
|||
std::string log_dir;
|
||||
log_dir = log_file_path.has_parent_path() ? log_file_path.parent_path().string() : log_space::log_singletone::get_default_log_folder();
|
||||
log_space::log_singletone::add_logger(LOGGER_FILE, log_file_path.filename().string().c_str(), log_dir.c_str(), LOG_LEVEL_4);
|
||||
message_writer(epee::log_space::console_color_white, true) << CURRENCY_NAME << " wallet v" << PROJECT_VERSION_LONG;
|
||||
message_writer(epee::log_space::console_color_white, true, std::string(), LOG_LEVEL_0) << CURRENCY_NAME << " simplewallet v" << PROJECT_VERSION_LONG;
|
||||
|
||||
if (command_line::has_arg(vm, command_line::arg_log_level))
|
||||
{
|
||||
|
|
@ -2886,15 +2886,18 @@ int main(int argc, char* argv[])
|
|||
}
|
||||
else
|
||||
{
|
||||
std::vector<std::string> params;
|
||||
boost::split(params, arg_pos_mining_defrag_str, boost::is_any_of(",;"), boost::token_compress_on);
|
||||
CHECK_AND_ASSERT_MES(params.size() == 3, EXIT_FAILURE, "incorrect number of params given: " << arg_pos_mining_defrag_str);
|
||||
int64_t outs_min = 0, outs_max = 0;
|
||||
uint64_t max_amount = 0;
|
||||
CHECK_AND_ASSERT_MES(epee::string_tools::string_to_num_fast(params[0], outs_min) && outs_min > 0 && outs_min < 256, EXIT_FAILURE, "incorrect param: " << params[0]);
|
||||
CHECK_AND_ASSERT_MES(epee::string_tools::string_to_num_fast(params[1], outs_max) && outs_max > 0 && outs_max < 256, EXIT_FAILURE, "incorrect param: " << params[1]);
|
||||
CHECK_AND_ASSERT_MES(currency::parse_amount(max_amount, params[2]), EXIT_FAILURE, "incorrect param: " << params[2]);
|
||||
wal.set_defragmentation_tx_settings(true, outs_min, outs_max, max_amount);
|
||||
if (arg_pos_mining_defrag_str != "disable")
|
||||
{
|
||||
std::vector<std::string> params;
|
||||
boost::split(params, arg_pos_mining_defrag_str, boost::is_any_of(",;"), boost::token_compress_on);
|
||||
CHECK_AND_ASSERT_MES(params.size() == 3, EXIT_FAILURE, "incorrect number of params given: " << arg_pos_mining_defrag_str);
|
||||
int64_t outs_min = 0, outs_max = 0;
|
||||
uint64_t max_amount = 0;
|
||||
CHECK_AND_ASSERT_MES(epee::string_tools::string_to_num_fast(params[0], outs_min) && outs_min > 0 && outs_min < 256, EXIT_FAILURE, "incorrect param: " << params[0]);
|
||||
CHECK_AND_ASSERT_MES(epee::string_tools::string_to_num_fast(params[1], outs_max) && outs_max > 0 && outs_max < 256, EXIT_FAILURE, "incorrect param: " << params[1]);
|
||||
CHECK_AND_ASSERT_MES(currency::parse_amount(max_amount, params[2]), EXIT_FAILURE, "incorrect param: " << params[2]);
|
||||
wal.set_defragmentation_tx_settings(true, outs_min, outs_max, max_amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,6 @@
|
|||
#define PROJECT_REVISION "0"
|
||||
#define PROJECT_VERSION PROJECT_MAJOR_VERSION "." PROJECT_MINOR_VERSION "." PROJECT_REVISION
|
||||
|
||||
#define PROJECT_VERSION_BUILD_NO 292
|
||||
#define PROJECT_VERSION_BUILD_NO 293
|
||||
#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 "]"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue