diff options
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rw-r--r-- | README.md | 52 | ||||
-rw-r--r-- | src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 13 | ||||
-rw-r--r-- | src/wallet/wallet2.cpp | 4 |
5 files changed, 61 insertions, 18 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index bb5e4b1ad..5ac4a2f95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -448,15 +448,11 @@ if(STATIC) set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_STATIC_RUNTIME ON) endif() -find_package(Boost 1.53 QUIET REQUIRED COMPONENTS system filesystem thread date_time chrono regex serialization program_options) +find_package(Boost 1.58 QUIET REQUIRED COMPONENTS system filesystem thread date_time chrono regex serialization program_options) set(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_LIB_SUFFIXES}) if(NOT Boost_FOUND) - die("Could not find Boost libraries, please make sure you have installed Boost or libboost-all-dev (1.53 or 1.55+) or the equivalent") -endif() - -if((Boost_MAJOR_VERSION EQUAL 1) AND (Boost_MINOR_VERSION EQUAL 54)) - die("Boost version 1.54 is unsupported due to a bug (see: http://goo.gl/RrCFmA), please install Boost 1.53 or 1.55 and above") + die("Could not find Boost libraries, please make sure you have installed Boost or libboost-all-dev (1.58) or the equivalent") endif() include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) @@ -36,13 +36,19 @@ Monero development can be supported directly through donations. Both Monero and Bitcoin donations can be made to donate.getmonero.org if using a client that supports the [OpenAlias](https://openalias.org) standard -The Monero donation address is: 44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A (viewkey: f359631075708155cc3d92a32b75a7d02a5dcf27756707b47a2b31b21c389501) +The Monero donation address is: `44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A` (viewkey: `f359631075708155cc3d92a32b75a7d02a5dcf27756707b47a2b31b21c389501`) -The Bitcoin donation address is: 1KTexdemPdxSBcG55heUuTjDRYqbC5ZL8H +The Bitcoin donation address is: `1KTexdemPdxSBcG55heUuTjDRYqbC5ZL8H` Core development funding and/or some supporting services are also graciously provided by sponsors: -[![MyMonero](https://static.getmonero.org/images/sponsors/mymonero.png)](https://mymonero.com) [![Kitware](https://static.getmonero.org/images/sponsors/kitware.png?1)](http://kitware.com) [![Dome9](https://static.getmonero.org/images/sponsors/dome9.png)](http://dome9.com) [![Araxis](https://static.getmonero.org/images/sponsors/araxis.png)](http://araxis.com) [![JetBrains](https://static.getmonero.org/images/sponsors/jetbrains.png)](http://www.jetbrains.com/) [![Navicat](https://static.getmonero.org/images/sponsors/navicat.png)](http://www.navicat.com/) +[<img width="80" src="https://static.getmonero.org/images/sponsors/mymonero.png"/>](https://mymonero.com) +[<img width="150" src="https://static.getmonero.org/images/sponsors/kitware.png?1"/>](http://kitware.com) +[<img width="100" src="https://static.getmonero.org/images/sponsors/dome9.png"/>](http://dome9.com) +[<img width="150" src="https://static.getmonero.org/images/sponsors/araxis.png"/>](http://araxis.com) +[<img width="150" src="https://static.getmonero.org/images/sponsors/jetbrains.png"/>](http://www.jetbrains.com/) +[<img width="150" src="https://static.getmonero.org/images/sponsors/navicat.png"/>](http://www.navicat.com/) +[<img width="150" src="https://static.getmonero.org/images/sponsors/symas.png"/>](http://www.symas.com/) There are also several mining pools that kindly donate a portion of their fees, [a list of them can be found on our Bitcointalk post](https://bitcointalk.org/index.php?topic=583449.0). @@ -54,8 +60,29 @@ See [LICENSE](LICENSE). ### Overview: -Dependencies: GCC 4.7.3 or later, CMake 3.0.0 or later, libunbound 1.4.16 or later (note: Unbound is not a dependency, libunbound is), libevent 2.0 or later, libgtest 1.5 or later, and Boost 1.53 or later (except 1.54, [more details here](http://goo.gl/RrCFmA)), BerkeleyDB 4.8 or later (note: on Ubuntu this means installing libdb-dev and libdb++-dev). -Static Build Additional Dependencies: ldns 1.6.17 or later, expat 1.1 or later, bison or yacc +Dependencies: + +* GCC `>=4.7.3` +* CMake `>=3.0.0` +* pkg-config +* libunbound `>=1.4.16` (note: Unbound is not a dependency, libunbound is) +* libevent `>=2.0` +* libgtest `>=1.5` +* Boost `>=1.58` +* BerkeleyDB `>=4.8` (note: on Ubuntu this means installing libdb-dev and libdb++-dev) +* libunwind (optional, for stack trace on exception) +* miniupnpc (optional, for NAT punching) + +Additional dependencies for statically-linked build: + +* ldns `>=1.6.17` +* expat `>=1.1` +* bison or yacc + +Additional dependencies for building documentation: + +* Doxygen +* graphviz **Basic Process:** @@ -100,7 +127,14 @@ Alternatively, it can be built in an easier and more automated fashion using Hom ### On Windows: -Dependencies: mingw-w64, msys2, CMake 3.0.0 or later, libunbound 1.4.16 or later (note: Unbound is not a dependency, libunbound is), and Boost 1.53 or 1.55 (except 1.54, [more details here](http://goo.gl/RrCFmA)), BerkeleyDB 4.8 or later (note: on Ubuntu this means installing libdb-dev and libdb++-dev). +Dependencies: + +* mingw-w64 +* msys2 +* CMake `>=3.0.0` +* libunbound `>=1.4.16` (note: Unbound is not a dependency, libunbound is) +* Boost 1.53 or 1.55 (except 1.54, [more details here](http://goo.gl/RrCFmA)) +* BerkeleyDB `>=4.8` **Preparing the Build Environment** @@ -189,7 +223,7 @@ To list all available options, run `./bin/bitmonerod --help`. Options can be specified either on the command line or in a configuration file passed by the `--config-file` argument. To specify an option in the configuration file, add a line with the syntax `argumentname=value`, where `argumentname` is the name -of the argument without any dashes, for example `log-level=1`. +of the argument without the leading dashes, for example `log-level=1`. ## Internationalization @@ -211,6 +245,6 @@ TAILS ships with a very restrictive set of firewall rules. Therefore, you need t ## Using readline -While bitmonerod and simplewallet do not use readline directly, most of the functionality can be obtained by running them via rlwrap. This allows command recall, edit capabilities, etc. It does not give autocompletion without an extra completion file, however. To use rlwrap, simply prepend "rlwrap " to the command line, eg: -rlwrap bin/simplewallet --wallet-file /path/to/wallet +While bitmonerod and simplewallet do not use readline directly, most of the functionality can be obtained by running them via rlwrap. This allows command recall, edit capabilities, etc. It does not give autocompletion without an extra completion file, however. To use rlwrap, simply prepend `rlwrap` to the command line, eg: +`rlwrap bin/simplewallet --wallet-file /path/to/wallet` diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8fa617aff..dfa31aa72 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -50,7 +50,7 @@ endfunction () function (enable_stack_trace target) if(STACK_TRACE) set_property(TARGET ${target} - APPEND PROPERTY COMPILER_DEFINITIONS "-DSTACK_TRACE") + APPEND PROPERTY COMPILE_DEFINITIONS "STACK_TRACE") if (STATIC) set_property(TARGET "${target}" APPEND PROPERTY LINK_FLAGS "-Wl,--wrap=__cxa_throw") diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 3f5297dfe..31c3a7732 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -76,6 +76,13 @@ typedef cryptonote::simple_wallet sw; #define DEFAULT_MIX 4 +// workaround for a suspected bug in pthread/kernel on MacOS X +#ifdef __APPLE__ +#define DEFAULT_MAX_CONCURRENCY 1 +#else +#define DEFAULT_MAX_CONCURRENCY 0 +#endif + #define LOCK_IDLE_SCOPE() \ bool auto_refresh_enabled = m_auto_refresh_enabled.load(std::memory_order_relaxed); \ m_auto_refresh_enabled.store(false, std::memory_order_relaxed); \ @@ -108,7 +115,7 @@ namespace const command_line::arg_descriptor<bool> arg_non_deterministic = {"non-deterministic", sw::tr("Create non-deterministic view and spend keys"), false}; const command_line::arg_descriptor<int> arg_daemon_port = {"daemon-port", sw::tr("Use daemon instance at port <arg> instead of 18081"), 0}; const command_line::arg_descriptor<uint32_t> arg_log_level = {"log-level", "", LOG_LEVEL_0}; - const command_line::arg_descriptor<uint32_t> arg_max_concurrency = {"max-concurrency", "Max number of threads to use for a parallel job", 0}; + const command_line::arg_descriptor<uint32_t> arg_max_concurrency = {"max-concurrency", "Max number of threads to use for a parallel job", DEFAULT_MAX_CONCURRENCY}; const command_line::arg_descriptor<std::string> arg_log_file = {"log-file", sw::tr("Specify log file"), ""}; const command_line::arg_descriptor<bool> arg_testnet = {"testnet", sw::tr("For testnet. Daemon must also be launched with --testnet flag"), false}; const command_line::arg_descriptor<bool> arg_restricted = {"restricted-rpc", sw::tr("Restricts RPC to view-only commands"), false}; @@ -1701,7 +1708,9 @@ bool simple_wallet::open_wallet(const string &wallet_file, const std::string& pa catch (const std::exception& e) { fail_msg_writer() << tr("failed to load wallet: ") << e.what(); - fail_msg_writer() << boost::format(tr("You may want to remove the file \"%s\" and try again")) % wallet_file; + // only suggest removing cache if the password was actually correct + if (m_wallet->verify_password(password)) + fail_msg_writer() << boost::format(tr("You may want to remove the file \"%s\" and try again")) % wallet_file; return false; } diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 922409519..8502353ed 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -28,6 +28,7 @@ // // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers +#include <random> #include <boost/archive/binary_oarchive.hpp> #include <boost/archive/binary_iarchive.hpp> @@ -3502,6 +3503,9 @@ uint64_t wallet2::import_key_images(const std::vector<std::pair<crypto::key_imag req.key_images.push_back(epee::string_tools::pod_to_hex(key_image)); } + for (size_t n = 0; n < signed_key_images.size(); ++n) + m_transfers[n].m_key_image = signed_key_images[n].first; + m_daemon_rpc_mutex.lock(); bool r = epee::net_utils::invoke_http_json_remote_command2(m_daemon_address + "/is_key_image_spent", req, daemon_resp, m_http_client, 200000); m_daemon_rpc_mutex.unlock(); |