aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md5
-rw-r--r--contrib/epee/src/string_tools.cpp1
-rw-r--r--src/cryptonote_core/tx_pool.cpp2
-rw-r--r--src/daemon/rpc_command_executor.cpp89
-rw-r--r--src/simplewallet/simplewallet.cpp4
5 files changed, 55 insertions, 46 deletions
diff --git a/README.md b/README.md
index 24bae84fc..7bebbbc5b 100644
--- a/README.md
+++ b/README.md
@@ -89,8 +89,9 @@ Dates are provided in the format YYYY-MM-DD.
| Fork Date | Consensus version | Minimum Monero Version | Recommended Monero Version | Details |
| ----------------- | ----------------- | ---------------------- | -------------------------- | ------------------ |
| 2016-09-21 | v3 | v0.9.4 | v0.10.0 | Splits coinbase into denominations |
-| 2017-01-05 | v4 | v0.10.1 | v0.10.2.2 | Allow normal and RingCT transactions |
-| 2017-09-21 | v5 | Not determined as of 2017-03-06 | Not determined as of 2017-03-06 | Allow only RingCT transactions |
+| 2017-01-05 | v4 | v0.10.1 | v0.10.2.1 | Allow normal and RingCT transactions |
+| 2017-04-15 | v5 | v0.10.2.1 | v0.10.3 | Adjusted minimum blocksize and fee algorithm |
+| 2017-09-21 | v6 | Not determined as of 2017-03-06 | Not determined as of 2017-03-06 | Allow only RingCT transactions |
## Installing Monero from a Package
diff --git a/contrib/epee/src/string_tools.cpp b/contrib/epee/src/string_tools.cpp
index c861cb1d6..d04b16b75 100644
--- a/contrib/epee/src/string_tools.cpp
+++ b/contrib/epee/src/string_tools.cpp
@@ -30,6 +30,7 @@
# include <winsock2.h>
#else
# include <arpa/inet.h>
+# include <netinet/in.h>
#endif
namespace epee
diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp
index cde97b52f..da5e6636a 100644
--- a/src/cryptonote_core/tx_pool.cpp
+++ b/src/cryptonote_core/tx_pool.cpp
@@ -621,7 +621,7 @@ namespace cryptonote
CRITICAL_REGION_LOCAL(m_transactions_lock);
- uint64_t best_coinbase = 0, coinbase;
+ uint64_t best_coinbase = 0, coinbase = 0;
total_size = 0;
fee = 0;
diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp
index b145310de..c5b17268d 100644
--- a/src/daemon/rpc_command_executor.cpp
+++ b/src/daemon/rpc_command_executor.cpp
@@ -91,6 +91,13 @@ namespace {
s = boost::lexical_cast<std::string>(dt/(3600*24)) + " days";
return s + " " + (t > now ? "in the future" : "ago");
}
+
+ std::string make_error(const std::string &base, const std::string &status)
+ {
+ if (status == CORE_RPC_STATUS_OK)
+ return base;
+ return base + " -- " + status;
+ }
}
t_rpc_command_executor::t_rpc_command_executor(
@@ -207,7 +214,7 @@ bool t_rpc_command_executor::save_blockchain() {
{
if (!m_rpc_server->on_save_bc(req, res) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -235,7 +242,7 @@ bool t_rpc_command_executor::show_hash_rate() {
{
if (!m_rpc_server->on_set_log_hash_rate(req, res) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
}
}
@@ -262,7 +269,7 @@ bool t_rpc_command_executor::hide_hash_rate() {
{
if (!m_rpc_server->on_set_log_hash_rate(req, res) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -289,7 +296,7 @@ bool t_rpc_command_executor::show_difficulty() {
{
if (!m_rpc_server->on_get_info(req, res) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message.c_str(), res.status);
return true;
}
}
@@ -373,12 +380,12 @@ bool t_rpc_command_executor::show_status() {
{
if (!m_rpc_server->on_get_info(ireq, ires) || ires.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, ires.status);
return true;
}
if (!m_rpc_server->on_hard_fork_info(hfreq, hfres, error_resp) || hfres.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, hfres.status);
return true;
}
if (!m_rpc_server->on_mining_status(mreq, mres))
@@ -393,7 +400,7 @@ bool t_rpc_command_executor::show_status() {
}
else if (mres.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, mres.status);
return true;
}
}
@@ -439,7 +446,7 @@ bool t_rpc_command_executor::print_connections() {
{
if (!m_rpc_server->on_get_connections(req, res, error_resp) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -504,7 +511,7 @@ bool t_rpc_command_executor::print_blockchain_info(uint64_t start_block_index, u
{
if (!m_rpc_server->on_get_block_headers_range(req, res, error_resp) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -544,7 +551,7 @@ bool t_rpc_command_executor::set_log_level(int8_t level) {
{
if (!m_rpc_server->on_set_log_level(req, res) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -572,7 +579,7 @@ bool t_rpc_command_executor::set_log_categories(const std::string &categories) {
{
if (!m_rpc_server->on_set_log_categories(req, res) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -599,7 +606,7 @@ bool t_rpc_command_executor::print_height() {
{
if (!m_rpc_server->on_get_height(req, res) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -629,7 +636,7 @@ bool t_rpc_command_executor::print_block_by_hash(crypto::hash block_hash) {
{
if (!m_rpc_server->on_get_block(req, res, error_resp) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -660,7 +667,7 @@ bool t_rpc_command_executor::print_block_by_height(uint64_t height) {
{
if (!m_rpc_server->on_get_block(req, res, error_resp) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -689,7 +696,7 @@ bool t_rpc_command_executor::print_transaction(crypto::hash transaction_hash) {
{
if (!m_rpc_server->on_get_transactions(req, res) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -752,7 +759,7 @@ bool t_rpc_command_executor::is_key_image_spent(const crypto::key_image &ki) {
{
if (!m_rpc_server->on_is_key_image_spent(req, res) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -787,7 +794,7 @@ bool t_rpc_command_executor::print_transaction_pool_long() {
{
if (!m_rpc_server->on_get_transaction_pool(req, res) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -870,7 +877,7 @@ bool t_rpc_command_executor::print_transaction_pool_short() {
{
if (!m_rpc_server->on_get_transaction_pool(req, res) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -918,7 +925,7 @@ bool t_rpc_command_executor::print_transaction_pool_stats() {
{
if (!m_rpc_server->on_get_transaction_pool(req, res) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -978,7 +985,7 @@ bool t_rpc_command_executor::start_mining(cryptonote::account_public_address add
{
if (!m_rpc_server->on_start_mining(req, res) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -1003,7 +1010,7 @@ bool t_rpc_command_executor::stop_mining() {
{
if (!m_rpc_server->on_stop_mining(req, res) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -1044,7 +1051,7 @@ bool t_rpc_command_executor::stop_daemon()
{
if (!m_rpc_server->on_stop_daemon(req, res) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -1142,7 +1149,7 @@ bool t_rpc_command_executor::out_peers(uint64_t limit)
{
if (!m_rpc_server->on_out_peers(req, res) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -1170,7 +1177,7 @@ bool t_rpc_command_executor::start_save_graph()
{
if (!m_rpc_server->on_start_save_graph(req, res) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -1196,7 +1203,7 @@ bool t_rpc_command_executor::stop_save_graph()
{
if (!m_rpc_server->on_stop_save_graph(req, res) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -1223,7 +1230,7 @@ bool t_rpc_command_executor::hard_fork_info(uint8_t version)
{
if (!m_rpc_server->on_hard_fork_info(req, res, error_resp) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -1254,7 +1261,7 @@ bool t_rpc_command_executor::print_bans()
{
if (!m_rpc_server->on_get_bans(req, res, error_resp) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -1296,7 +1303,7 @@ bool t_rpc_command_executor::ban(const std::string &ip, time_t seconds)
{
if (!m_rpc_server->on_set_bans(req, res, error_resp) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -1332,7 +1339,7 @@ bool t_rpc_command_executor::unban(const std::string &ip)
{
if (!m_rpc_server->on_set_bans(req, res, error_resp) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -1359,9 +1366,9 @@ bool t_rpc_command_executor::flush_txpool(const std::string &txid)
}
else
{
- if (!m_rpc_server->on_flush_txpool(req, res, error_resp))
+ if (!m_rpc_server->on_flush_txpool(req, res, error_resp) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -1390,9 +1397,9 @@ bool t_rpc_command_executor::output_histogram(uint64_t min_count, uint64_t max_c
}
else
{
- if (!m_rpc_server->on_get_output_histogram(req, res, error_resp))
+ if (!m_rpc_server->on_get_output_histogram(req, res, error_resp) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -1427,9 +1434,9 @@ bool t_rpc_command_executor::print_coinbase_tx_sum(uint64_t height, uint64_t cou
}
else
{
- if (!m_rpc_server->on_get_coinbase_tx_sum(req, res, error_resp))
+ if (!m_rpc_server->on_get_coinbase_tx_sum(req, res, error_resp) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -1467,12 +1474,12 @@ bool t_rpc_command_executor::alt_chain_info()
{
if (!m_rpc_server->on_get_info(ireq, ires) || ires.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, ires.status);
return true;
}
if (!m_rpc_server->on_get_alternate_chains(req, res, error_resp))
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
@@ -1515,12 +1522,12 @@ bool t_rpc_command_executor::print_blockchain_dynamic_stats(uint64_t nblocks)
{
if (!m_rpc_server->on_get_info(ireq, ires) || ires.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, ires.status);
return true;
}
if (!m_rpc_server->on_get_per_kb_fee_estimate(fereq, feres, error_resp) || feres.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, feres.status);
return true;
}
}
@@ -1546,7 +1553,7 @@ bool t_rpc_command_executor::print_blockchain_dynamic_stats(uint64_t nblocks)
{
if (!m_rpc_server->on_get_block_headers_range(bhreq, bhres, error_resp) || bhres.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, bhres.status);
return true;
}
}
@@ -1612,7 +1619,7 @@ bool t_rpc_command_executor::update(const std::string &command)
{
if (!m_rpc_server->on_update(req, res) || res.status != CORE_RPC_STATUS_OK)
{
- tools::fail_msg_writer() << fail_message.c_str();
+ tools::fail_msg_writer() << make_error(fail_message, res.status);
return true;
}
}
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index 134841a25..6cbdf1a1e 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -637,8 +637,8 @@ simple_wallet::simple_wallet()
m_cmd_binder.set_handler("incoming_transfers", boost::bind(&simple_wallet::show_incoming_transfers, this, _1), tr("incoming_transfers [available|unavailable] - Show incoming transfers, all or filtered by availability"));
m_cmd_binder.set_handler("payments", boost::bind(&simple_wallet::show_payments, this, _1), tr("payments <PID_1> [<PID_2> ... <PID_N>] - Show payments for given payment ID[s]"));
m_cmd_binder.set_handler("bc_height", boost::bind(&simple_wallet::show_blockchain_height, this, _1), tr("Show blockchain height"));
- m_cmd_binder.set_handler("transfer_original", boost::bind(&simple_wallet::transfer, this, _1), tr("transfer [<mixin_count>] <addr_1> <amount_1> [<addr_2> <amount_2> ... <addr_N> <amount_N>] [payment_id] - Transfer <amount_1>,... <amount_N> to <address_1>,... <address_N>, respectively. <mixin_count> is the number of extra inputs to include for untraceability (from 2 to maximum available)"));
- m_cmd_binder.set_handler("transfer", boost::bind(&simple_wallet::transfer_new, this, _1), tr("Same as transfer_original, but using a new transaction building algorithm"));
+ m_cmd_binder.set_handler("transfer_original", boost::bind(&simple_wallet::transfer, this, _1), tr("Same as transfer, but using an older transaction building algorithm"));
+ m_cmd_binder.set_handler("transfer", boost::bind(&simple_wallet::transfer_new, this, _1), tr("transfer [<mixin_count>] <address> <amount> [<payment_id>] - Transfer <amount> to <address>. <mixin_count> is the number of extra inputs to include for untraceability. Multiple payments can be made at once by adding <address_2> <amount_2> etcetera (before the payment ID, if it's included)"));
m_cmd_binder.set_handler("locked_transfer", boost::bind(&simple_wallet::locked_transfer, this, _1), tr("locked_transfer [<mixin_count>] <addr> <amount> <lockblocks>(Number of blocks to lock the transaction for, max 1000000) [<payment_id>]"));
m_cmd_binder.set_handler("sweep_unmixable", boost::bind(&simple_wallet::sweep_unmixable, this, _1), tr("Send all unmixable outputs to yourself with mixin 0"));
m_cmd_binder.set_handler("sweep_all", boost::bind(&simple_wallet::sweep_all, this, _1), tr("sweep_all [mixin] address [payment_id] - Send all unlocked balance an address"));