mirror of
https://github.com/monero-project/monero.git
synced 2025-08-21 09:58:15 -04:00
Merge pull request #4071
d6d78f1
Allow fractional outputs to be ignored (stoffu)
This commit is contained in:
commit
be81a27fa4
4 changed files with 38 additions and 0 deletions
|
@ -2091,6 +2091,19 @@ bool simple_wallet::set_segregation_height(const std::vector<std::string> &args/
|
|||
return true;
|
||||
}
|
||||
|
||||
bool simple_wallet::set_ignore_fractional_outputs(const std::vector<std::string> &args/* = std::vector<std::string>()*/)
|
||||
{
|
||||
const auto pwd_container = get_and_verify_password();
|
||||
if (pwd_container)
|
||||
{
|
||||
parse_bool_and_use(args[1], [&](bool r) {
|
||||
m_wallet->ignore_fractional_outputs(r);
|
||||
m_wallet->rewrite(m_wallet_file, pwd_container->password());
|
||||
});
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool simple_wallet::help(const std::vector<std::string> &args/* = std::vector<std::string>()*/)
|
||||
{
|
||||
if(args.empty())
|
||||
|
@ -2478,6 +2491,7 @@ bool simple_wallet::set_variable(const std::vector<std::string> &args)
|
|||
const std::pair<size_t, size_t> lookahead = m_wallet->get_subaddress_lookahead();
|
||||
success_msg_writer() << "subaddress-lookahead = " << lookahead.first << ":" << lookahead.second;
|
||||
success_msg_writer() << "segregation-height = " << m_wallet->segregation_height();
|
||||
success_msg_writer() << "ignore-fractional-outputs = " << m_wallet->ignore_fractional_outputs();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
@ -2532,6 +2546,7 @@ bool simple_wallet::set_variable(const std::vector<std::string> &args)
|
|||
CHECK_SIMPLE_VARIABLE("key-reuse-mitigation2", set_key_reuse_mitigation2, tr("0 or 1"));
|
||||
CHECK_SIMPLE_VARIABLE("subaddress-lookahead", set_subaddress_lookahead, tr("<major>:<minor>"));
|
||||
CHECK_SIMPLE_VARIABLE("segregation-height", set_segregation_height, tr("unsigned integer"));
|
||||
CHECK_SIMPLE_VARIABLE("ignore-fractional-outputs", set_ignore_fractional_outputs, tr("0 or 1"));
|
||||
}
|
||||
fail_msg_writer() << tr("set: unrecognized argument(s)");
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue