Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc bugfixes #203

Merged
merged 2 commits into from
Sep 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/cryptonote_core/tx_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ namespace cryptonote

uint64_t template_accept_threshold(uint64_t amount)
{
return amount * ACCEPT_THRESHOLD;
// XXX: multiplying by ACCEPT_THRESHOLD here was removed because of a need
// to accept 0 fee transactions correctly. the cast to float / double and
// back again was causing issues estimating the effect of a zero fee tx
return amount;
}

uint64_t get_transaction_size_limit(uint8_t version)
Expand Down
4 changes: 2 additions & 2 deletions src/simplewallet/simplewallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5058,7 +5058,7 @@ bool simple_wallet::register_service_node(const std::vector<std::string> &args_)
break;
if (!m_idle_run.load(std::memory_order_relaxed))
break;
m_idle_cond.wait_for(lock, boost::chrono::seconds(120));
m_idle_cond.wait_for(lock, boost::chrono::seconds(AUTOSTAKE_INTERVAL));
}
}
else
Expand Down Expand Up @@ -5471,7 +5471,7 @@ bool simple_wallet::stake(const std::vector<std::string> &args_)
break;
if (!m_idle_run.load(std::memory_order_relaxed))
break;
m_idle_cond.wait_for(lock, boost::chrono::seconds(120));
m_idle_cond.wait_for(lock, boost::chrono::seconds(AUTOSTAKE_INTERVAL));
}
}
else
Expand Down
2 changes: 2 additions & 0 deletions src/simplewallet/simplewallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
// Hardcode Monero's donation address (see #1447)
constexpr const char MONERO_DONATION_ADDR[] = "44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A";

const int AUTOSTAKE_INTERVAL = 60 * 40; // once every 40 minutes.

/*!
* \namespace cryptonote
* \brief Holds cryptonote related classes and helpers.
Expand Down