aboutsummaryrefslogtreecommitdiff
path: root/src/common (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2018-04-26Adding required library (dependency of boost::this_thread::sleep_for)Gene Peters1-0/+1
2018-04-25Adding required library (dependency of boost::this_thread::sleep_for)Gene Peters1-0/+1
2018-04-12util: log stack trace on crashmoneromooo-monero1-0/+39
2018-04-12util: log stack trace on crashmoneromooo-monero1-0/+39
2018-04-10common: make this build with unbound 1.4.20moneromooo-monero2-2/+5
Common on currently used distros
2018-04-10common: make this build with unbound 1.4.20moneromooo-monero2-2/+5
Common on currently used distros
2018-03-05Correct spelling mistakes.Edward Betts1-2/+2
2018-03-05command_line: allow args to depend on more than one argsstoffu1-9/+57
2018-03-05command_line::get_arg: remove 'required' for dependent args as they're ↵stoffu1-3/+3
always optional
2018-03-05command line: allow has_arg to handle arg_descriptor<bool,false,true> #3318stoffu1-4/+4
2018-02-25Wallet2 + CLI wallet: UTF-8 support for filenames and paths under Windowsrbrunner71-8/+15
2018-02-16common: implement dynamic option dependencies mechanismwhythat1-14/+11
2018-02-16common: implement dependent option descriptorwhythat1-5/+45
2018-02-10handle ^D and ^C while password promptingJethro Grassie3-6/+17
2018-02-08dns: change default DNS to a worldwide selectionmoneromooo-monero2-10/+20
DNSSEC aware servers picked from https://wiki.ipfire.org/dns/public-servers
2018-02-02threadpool: catch exceptions in dtor, to avoid terminatemoneromooo-monero2-1/+20
If an exception is thrown, it is ignored. While this may hide a bug, this should only be system exceptions in boost, which is pretty unlikely. Morever, wait should be called manually before the dtor anyway. Add an error message if the dtor has to wait in case some such cases creep in so they get fixed. Coverity 182538
2018-02-02perf_timer: rewrite to make it clear there is no division by zeromoneromooo-monero1-4/+3
It could have happened if epee::misc_utils::get_ns_count is buggy, at a push Coverity 182561
2018-01-31wipeable_string: call memwipe directlymoneromooo-monero1-2/+0
since the original reason for the indirect call (that memwipe was not in contrib) is now gone
2018-01-29rpc_client: Fix error handlingErik de Castro Lopo1-8/+8
Previous code was unable to distingush between a connection error and a communication error.
2018-01-27Fixed #if instead of #ifdefMatt Little1-3/+3
2018-01-26Readd copyright starting datexmr-eric12-12/+12
2018-01-26Update 2018 copyrightxmr-eric35-35/+35
2018-01-25Support building cncrypto lib with msvcMatt Little1-0/+9
2018-01-15perf_timer: add faster x86_64 timers, and pause/resumemoneromooo-monero2-7/+77
2018-01-15perf_timer: use std::unique_ptr instead of new/deletemoneromooo-monero1-2/+3
2018-01-10move memwipe to epee to avoid common<->crypto circular dependenciesmoneromooo-monero4-197/+1
2018-01-10epee: remove dependency on commonmoneromooo-monero1-0/+1
2018-01-08util: warn if unbound was not built with threadsmoneromooo-monero1-0/+17
This can causes crashes in libunbound
2018-01-04Removed unused mac-specific output folder pathMaxithi1-9/+1
2018-01-04common cmake: make sure translation_files.h is generated for i18n.cppstoffu1-1/+2
2017-12-27apply_permutation.h: add #pragma oncemoneromooo-monero1-0/+2
2017-12-26only include the easylogging++ stack trace code when neededmoneromooo-monero1-0/+3
2017-12-23threadpool: fix deadlock in recursive waiter usagemoneromooo-monero1-1/+7
If a queued job uses a waiter, then we want to run that waiter's jobs in the current thread if all threads are busy, even if the queue is empty, since there is no guarantee that any thread will free up to take care of that new job, since all the threads might be running a job which spawns such a recursive job and will block till that recursive job is done, which it will never be since it relies on the queue being polled by one of those blocked threads.
2017-12-16move includes around to lessen overall loadmoneromooo-monero7-35/+46
2017-12-16Scrub keys from memory just before scope end.moneromooo-monero1-0/+43
Partially implements #74. Securely erases keys from memory after they are no longer needed. Might have a performance impact, which I haven't measured (perf measurements aren't generally reliable on laptops). Thanks to @stoffu for the suggestion to specialize the pod_to_hex/hex_to_pod functions. Using overloads + SFINAE instead generalizes it so other types can be marked as scrubbed without adding more boilerplate.
2017-12-15Embed the translation files in the binaryGuillaume LE VAILLANT1-13/+30
If a translation file exists in a "translations" directory located in the same directory as the binary, it is used in priority (this can be useful when working on translations as you don't have to recompile the whole program all the time), and if no such file is found the embedded translation file is used (if it exists).
2017-12-15resumption support for updates using range requestsmoneromooo-monero1-7/+49
2017-12-14updates: use https for updatesmoneromooo-monero1-1/+1
2017-12-14download: SSL suportmoneromooo-monero1-2/+3
2017-12-07perf_timer: add non scoped start/stop timer definesmoneromooo-monero1-0/+3
2017-12-07util: allow non numeric version partsmoneromooo-monero1-7/+7
2017-11-28Fix password capitalization mismatchxmr-eric1-1/+1
2017-11-27new wipeable_string class to replace std::string passphrasesmoneromooo-monero3-26/+20
2017-11-27utils: initialize easylogging++ in on_startupmoneromooo-monero1-0/+2
It will be reinitialized later once we know about log file and other command line configuration
2017-11-27use memwipe in a few relevant placesmoneromooo-monero1-2/+5
2017-11-27add a memwipe functionmoneromooo-monero3-0/+153
It's meant to avoid being optimized out memory_cleanse lifted from bitcoin
2017-11-18fixed common/util.cpp to link against libresslston1th1-1/+1
2017-11-15Tools, daemonizer: fix building on WindowsiDunk54001-0/+5
2017-11-14wallet: rejig to avoid prompting in wallet2moneromooo-monero2-6/+3
wallet2 is a library, and should not prompt for stdin. Instead, pass a function so simplewallet can prompt on stdin, and a GUI might display a window, etc.
2017-11-14move input_line from command_line to simplewalletmoneromooo-monero2-20/+0
It was only used there, and this removes one part of the common dependency on libreadline
2017-11-14move cryptonote command line options to cryptonote_coremoneromooo-monero2-58/+0
Those have no reason to be in a generic module
2017-11-14make this build on SunOS/SolarisPavel Maryanov2-1/+5
2017-11-14simplewallet: reject invalid argument for boolean parameterstoffu2-0/+16
2017-11-03updates: add a special case for "install-" build tags on windowsmoneromooo-monero1-1/+1
Those will have a ".exe" file extension, not .zip.
2017-11-03Disguise password length in promptLeon Klingele1-4/+0
2017-11-02Use max_concurrency as-isHoward Chu1-2/+2
Don't try to 2nd guess user
2017-10-21Initialize openssl on startupmoneromooo-monero1-0/+7
2017-10-14Add tools::on_startup, and warn about glibc 2.25 bug if foundmoneromooo-monero2-0/+17
https://sourceware.org/bugzilla/show_bug.cgi?id=21778
2017-10-10dns_utils: allow an optional DNS server IP in DNS_PUBLICmoneromooo-monero2-6/+41
tcp://a.b.c.d
2017-10-09util: ignore SIGPIPEmoneromooo-monero1-1/+2
In practice, this seems to cause monero-wallet-rpc to exit when ^C quits whatever its output is piped into (such as tee), but it saves, while it did not before.
2017-10-06add a command_line function to check for defaulted optionsmoneromooo-monero1-0/+6
2017-09-21dns_utils: query DNS records in parallelmoneromooo-monero1-6/+15
2017-09-18blockchain: reject unsorted ins and outs from v7moneromooo-monero1-1/+8
This ensures no information is leaked by the ordering
2017-09-15Tweak concurrency limitsHoward Chu2-2/+6
Create capacity for 2x max, but lie about it
2017-09-14Use a threadpoolHoward Chu8-619/+203
Instead of constantly creating and destroying threads
2017-09-13common: add apply_permutation file and functionmoneromooo-monero2-0/+62
This algorithm is adapted from Raymond Chen's code: https://blogs.msdn.microsoft.com/oldnewthing/20170109-00/?p=95145
2017-09-08Silence more stupid gcc warningsHoward Chu1-7/+7
2017-09-05json serialization for rpc-relevant monero typesThomas Winget1-0/+147
Structured {de-,}serialization methods for (many new) types which are used for requests or responses in the RPC. New types include RPC requests and responses, and structs which compose types within those. # Conflicts: # src/cryptonote_core/blockchain.cpp
2017-09-04dns_utils: remove a few obsolete thingsmoneromooo-monero1-4/+0
2017-09-03Add a --fluffy-blocks option to relay blocks as fluffy blocksmoneromooo-monero2-0/+6
Defaults to off, but fluffy blocks are forced enabled on testnet
2017-08-30Do not create file when RPC user/pass is given and use file lockingLee Clagett2-23/+79
2017-08-29move db specific options to BlockchainDBmoneromooo-monero2-20/+0
Avoids common depending on blockchain_db, which can cause link errors.
2017-08-23thread_group: set thread size to THREAD_STACK_SIZEmoneromooo-monero1-1/+4
2017-08-22rpc_client: print destination host/port when failing to connectmoneromooo-monero1-3/+3
2017-08-20More DB support cleanupHoward Chu1-1/+1
Hide DB types from db_types.h - no reason to recompile dependencies when DB types change. Also remove lingering in-memory DB references, they've been obsolete since 9e82b694da120708652871b55f639d1ef306a7ec
2017-08-17cryptonote_protocol: large block sync size before v4moneromooo-monero1-2/+2
2017-08-12core: add --db-salvage command line flagmoneromooo-monero2-0/+6
Use to load the database when the primary meta page is corrupted
2017-08-11simplewallet: factor out message_writermoneromooo-monero1-2/+2
2017-08-11scoped_message_writer: pause readline to match simplewalletmoneromooo-monero1-0/+9
2017-08-07updates: add "misc_log_ex.h" for logsmoneromooo-monero1-0/+1
2017-08-07dns_utils: add <functional> for std::functionmoneromooo-monero1-0/+1
2017-08-01perf_timer: allow profiling more granular than millisecondmoneromooo-monero1-6/+9
2017-07-31some include cleanupmoneromooo-monero3-4/+3
2017-07-27move get_proof_of_trust_hash from util.h to p2p_protocol_defs.hmoneromooo-monero1-9/+0
This avoids having to include p2p_protocol_defs.h in util.h, as util.h is used a lot, and p2p_protocol_defs.h includes a lot of other things that most users don't need.
2017-07-27Move OpenAlias console input back from libsmoneromooo-monero2-44/+4
Library code should definitely not ask for console input unless it's clearly an input function. Delegating the user interaction part to the caller means it can now be used by a GUI, or have a decision algorithm better adapted to a particular caller.
2017-07-24Make msgwriter logs go to file onlymoneromooo-monero1-1/+1
This was the case for monero-wallet-cli already, but not for monerod, which was making it pretty spammy as it was duplicating intended output. Since my original intent was to ensure logs included command output for debugging, this achieves both.
2017-07-05Fix spelling errorsErik de Castro Lopo1-2/+2
2017-06-28Ensure DNSResolver destructor runs on exitHoward Chu1-6/+2
Plugs a noisy but benign memory leak
2017-06-18Add readline support to clijethro2-0/+14
This PR adds readline support to the daemon and monero-wallet-cli. Only GNU readline is supported (e.g. not libedit) and there are cmake checks to ensure this. There is a cmake variable, Readline_ROOT_DIR that can specify a directory to find readline, otherwise some default paths are searched. There is also a cmake option, USE_READLINE, that defaults to ON. If set to ON, if readline is not found, the build continues but without readline support. One negative side effect of using readline is that the color prompt in the wallet-cli now has no color and just uses terminal default. I know how to fix this but it's quite a big change so will tackle another time.
2017-05-23changed crypto to cncrypto so it generated libcncryptoGentian1-1/+1
fix a cmakelist
2017-03-18use const references in catch blocksmoneromooo-monero1-1/+1
2017-03-17wallet-rpc: enable openaliasstoffu2-4/+6
2017-03-05download: check available disk space before downloadingmoneromooo-monero1-0/+8
We don't check *while* the download happens, so it might still be that we don't have enough space later
2017-03-05download: give download threads distinct namesmoneromooo-monero1-0/+5
2017-03-05download: async APImoneromooo-monero2-26/+153
2017-02-23core: protect precomputed block hashes with SHA256moneromooo-monero2-0/+13
2017-02-22updates: fix user/auto url splitmoneromooo-monero1-1/+1
2017-02-22updates: remove testnet casemoneromooo-monero2-6/+3
It need not be any different
2017-02-22updates: we now have a user URL, and an automatic onemoneromooo-monero2-3/+3
So the user can use https, while the automatic does not have to
2017-02-22updates: add all update serversmoneromooo-monero1-0/+4
2017-02-22updates: use HTTP, not HTTPSmoneromooo-monero1-1/+1
The files are hashed and the hashes signed
2017-02-21updates: use updates host, not downloads, for HTTPmoneromooo-monero1-1/+1
2017-02-21update copyright year, fix occasional lack of newline at line endRiccardo Spagni23-23/+23
2017-02-21cmakify opensslRiccardo Spagni1-1/+3
2017-02-21dns_utils: fix infinite recursion when distributing empty dns_urlsanonimal1-0/+3
load_txt_records_from_dns attempts to distribute `a = 0, b = -1` where (b = dns_urls.size() - 1) and IntType is signed integer. This results in an infinite recursion which leads to SIGSEGV.
2017-02-20core: updates can now be downloaded (and SHA256 hash checked)moneromooo-monero3-0/+176
2017-02-20util: add a SHA256 functionmoneromooo-monero3-1/+37
2017-02-20Optionally query moneropulse DNS records to check for updatesmoneromooo-monero5-2/+161
It just checks and prints a message if there is a new version for now.
2017-02-20dns_utils: fix first checked DNS entry being ignoredmoneromooo-monero1-1/+0
2017-02-20util: add a vercmp function to compare version numbersmoneromooo-monero2-0/+18
It is simple, supports simple x.y.z type numeric versions, and does not attempt any kind of validation
2017-02-20dns_utils: factor TXT record loading code from checkpoint codemoneromooo-monero2-0/+105
2017-02-12Fixup choice of easylogging++ vs libunwind stack trace codemoneromooo-monero1-1/+1
2017-02-08extract some basic code from libcryptonote_core into libcryptonote_basickenshi843-2/+3
2017-02-06Add server auth to monerod, and client auth to wallet-cli and wallet-rpcLee Clagett7-3/+416
2017-02-05common: fix link error on at least one platform (no clue which one)moneromooo-monero1-0/+1
Bug and fix reported by tdprime
2017-02-04Use easylogging++'s stack trace facility where possiblemoneromooo-monero1-0/+19
This avoids using libunwind, which often causes trouble.
2017-01-28Factor is_address_local code into a tools functionmoneromooo-monero2-0/+39
2017-01-25Updates to epee HTTP client codeLee Clagett2-35/+17
- http_simple_client now uses std::chrono for timeouts - http_simple_client accepts timeouts per connect / invoke call - shortened names of epee http invoke functions - invoke command functions only take relative path, connection is not automatically performed
2017-01-24moved get_account_address_from_str_or_url from libcommon to libcryptonote_corekenshi842-23/+0
2017-01-22Replace BOOST_FOREACH with C++11 ranged forMiguel Herranz1-3/+3
2017-01-21Make stack trace show up in log file with default settingsmoneromooo-monero1-1/+1
2017-01-16Change logging to easylogging++moneromooo-monero7-33/+54
This replaces the epee and data_loggers logging systems with a single one, and also adds filename:line and explicit severity levels. Categories may be defined, and logging severity set by category (or set of categories). epee style 0-4 log level maps to a sensible severity configuration. Log files now also rotate when reaching 100 MB. To select which logs to output, use the MONERO_LOGS environment variable, with a comma separated list of categories (globs are supported), with their requested severity level after a colon. If a log matches more than one such setting, the last one in the configuration string applies. A few examples: This one is (mostly) silent, only outputting fatal errors: MONERO_LOGS=*:FATAL This one is very verbose: MONERO_LOGS=*:TRACE This one is totally silent (logwise): MONERO_LOGS="" This one outputs all errors and warnings, except for the "verify" category, which prints just fatal errors (the verify category is used for logs about incoming transactions and blocks, and it is expected that some/many will fail to verify, hence we don't want the spam): MONERO_LOGS=*:WARNING,verify:FATAL Log levels are, in decreasing order of priority: FATAL, ERROR, WARNING, INFO, DEBUG, TRACE Subcategories may be added using prefixes and globs. This example will output net.p2p logs at the TRACE level, but all other net* logs only at INFO: MONERO_LOGS=*:ERROR,net*:INFO,net.p2p:TRACE Logs which are intended for the user (which Monero was using a lot through epee, but really isn't a nice way to go things) should use the "global" category. There are a few helper macros for using this category, eg: MGINFO("this shows up by default") or MGINFO_RED("this is red"), to try to keep a similar look and feel for now. Existing epee log macros still exist, and map to the new log levels, but since they're used as a "user facing" UI element as much as a logging system, they often don't map well to log severities (ie, a log level 0 log may be an error, or may be something we want the user to see, such as an important info). In those cases, I tried to use the new macros. In other cases, I left the existing macros in. When modifying logs, it is probably best to switch to the new macros with explicit levels. The --log-level options and set_log commands now also accept category settings, in addition to the epee style log levels.
2017-01-10Remove db-auto-remove-logsMiguel Herranz2-6/+0
2017-01-10Show available types for db-type commandMiguel Herranz1-1/+4
2017-01-05Build wallet with Android NDKMoroccanMalinois1-1/+13
2016-12-21make openalias also available for solo miner; introduce namespace ↵kenshi842-0/+162
tools::dns_utils; support integrated address with dns lookup
2016-12-20common: add missing #include <system_error> for std::error_codemoneromooo-monero1-0/+1
2016-12-20also use portable serializer for boost_serialization_helper.h and ↵kenshi841-5/+20
net_node.inl, completely adandon boost/archive/binary_oarchive.hpp
2016-12-16Enabled HTTP auth support for monero-wallet-rpcLee Clagett3-10/+111
2016-12-11thread_group: fix build on older GCCmoneromooo-monero1-2/+0
vtnerd (original author) confirmed this is the Right Way.
2016-12-04Fix a few minor typosPierre Boyer1-1/+1
2016-11-25Added command_line::is_yesLee Clagett2-1/+29
2016-11-23Added task_region - a fork/join task implementationLee Clagett5-77/+394
2016-11-09thread_group: fix build with asserts enabledmoneromooo-monero1-1/+1
See https://github.com/monero-project/monero/pull/1291
2016-11-02adding thread_group for managing async tasksLee Clagett3-2/+301
2016-10-20perf_timer: format string fix for 32 bitsmoneromooo-monero1-1/+1
2016-10-10perf_timer: new class and macros to make performance logs easiermoneromooo-monero3-1/+142
Call PERF_TIMER(name), which is scoped.
2016-09-26Dropped "bit" from bitmonero.Randi Joseph1-3/+3
2016-09-26Dropped "bit" from bitmonero.Randi Joseph1-3/+3
2016-09-24core: make the sync chunk block count overridablemoneromooo-monero2-0/+7
2016-09-18epee: optionally restrict HTTP service to a configurable user agentmoneromooo-monero2-0/+2
This is intended to catch traffic coming from a web browser, so we avoid issues with a web page sending a transfer RPC to the wallet. Requiring a particular user agent can act as a simple password scheme, while we wait for 0MQ and proper authentication to be merged.
2016-09-18cmake: transitive deps and remove deprecated LINK_*redfish1-1/+3
Keep the immediate direct deps at the library that depends on them, declare deps as PUBLIC so that targets that link against that library get the library's deps as transitive deps. Break dep cycle between blockchain_db <-> crytonote_core. No code refactoring, just hide cycle from cmake so that it doesn't complain (cycles are allowed only between static libs, not shared libs). This is in preparation for supproting BUILD_SHARED_LIBS cmake built-in option for building internal libs as shared.
2016-08-29More for PR#999Howard Chu1-1/+1
2016-08-28wallet: fix some "may be used uninitialized" warningsmoneromooo-monero1-2/+2
The compiler can't always work out the _found booleans are set iff the value is initialized.
2016-07-27cmake,common: flag for stack traceredfish2-6/+5
By default the flag is enabled whenever libunwind is found on the system, with the exception of static build on OSX (for which we can't install the throw hook #932 due to lack of support for --wrap in OSX ld64 linker).
2016-07-10common: stack trace: make clang happy with func ptrsredfish1-9/+29
Tested that it builds with: gcc 6.1.1, STATIC=OFF,i686 gcc 6.1.1, STATIC=OFF,armv7h clang 3.8, STATIC=OFF,i686 clang 3.8, STATIC=OFF,armv7h gcc 6.1.1, STATIC=ON,i686 clang 3.8, STATIC=ON,i686 Also tested that stack trace is generated fine on exception on: i686, gcc 6.1.1, STATIC=OFF (didn't bother testing all the other platforms/configs) This should fix the build problem on OSX (#871, #901), but I don't have OSX, so I could only test Clang on Linux.
2016-06-21remove POSIX_C_SOURCE and remove dlfcn.h for static buildsluigi11111-0/+2
The former was a faulty "fix" for gmtime_r not existing on Windows. The latter is needed only for dynamic builds, and is not included with msys2, which ends up fine because Windows is only built static at this time.
2016-06-20common: fix build without libunwindmoneromooo-monero1-2/+2
2016-04-28Print stack trace on exceptionsmoneromooo-monero3-2/+168
if libunwind is found. Useful for debugging logs.
2016-04-28add a --max-concurrency flagmoneromooo-monero2-0/+26
It sets the max number of threads to use for a parallel job. This is different that the number of total threads, since monero binaries typically start a lot of them.
2016-04-06util: add a function to set umask to 077moneromooo-monero2-0/+11
Useful to ensure files are written without group/other read rights.
2016-03-27common: new json_util.hmoneromooo-monero1-0/+53
With code to help factor out reading typed fields from JSON
2016-03-21Revert "Print stack trace upon exceptions"moneromooo-monero3-140/+0
Ain't nobody got time for link/cmake skullduggery. This reverts commit fff238ec94ac6d45fc18c315d7bc590ddfaad63d.
2016-03-19Print stack trace upon exceptionsmoneromooo-monero3-0/+140
Useful for debugging users' logs
2016-03-11Use boost::thread instead of std::threadHoward Chu1-2/+2
and all other associated IPC
2016-02-23dns_utils: const compatibility with older libunboundmoneromooo-monero1-22/+16
https://www.nlnetlabs.nl/bugs-script/show_bug.cgi?id=515
2016-02-18std::condvar is broken on Win32 with gcc/g++ 4.8 tooHoward Chu1-2/+2
Use boost...
2016-02-08core_tests: add tests for hard fork behaviors (MRL-0004)moneromooo-monero2-6/+0
We also replace the --fakechain option with an optional structure containing details about configuration for the core/blockchain, for test purposes. This seems more future friendly.
2016-01-27more typos fixedHenning Kopp1-1/+1
2016-01-25more typos fixedHenning Kopp1-1/+1
2016-01-21OpenBSD support for Monero.me0wmix1-0/+2
2015-12-31updated copyright yearRiccardo Spagni19-19/+19
2015-12-19Add missing semicolons after log statementsmoneromooo-monero1-1/+1
2015-12-15Replace tabs and remove trailing whitespacewarptangent1-24/+24
2015-12-15Optionally restrict DNS queries to TCPwarptangent1-3/+24
Sample use: DNS_PUBLIC=tcp torsocks bin/bitmonerod --p2p-bind-ip 127.0.0.1 Test: Run above with --log-level 4 with and without DNS_PUBLIC environment variable set. DNS debugging info should show successful DNS lookups only when DNS_PUBLIC is set to "tcp": DNS lookup for seeds.moneroseeds.se: 17 results DNS lookup for seeds.moneroseeds.ae.org: 17 results DNS lookup for seeds.moneroseeds.ch: 12 results DNS lookup for seeds.moneroseeds.li: 12 results
2015-12-13add a --fakechain argument for testsmoneromooo-monero2-0/+6
The core tests use the blockchain, and reset it to be able to add test data to it. This does not play nice with the databases, since those will save that data without an explicit save call. We add a fakechain flag that the tests will set, which tells the core and blockchain code to use a separate database, as well as skip a few things like checkpoints and fixup, which only make sense for real data.
2015-12-08Register daemon command line arguments to core if they're used in coremoneromooo-monero2-0/+48
This fixes coretests, which does not register daemon specific arguments, but uses core, which uses those arguments. Also gets rid of an unwanted dependency on daemon code from core.
2015-11-29wallet: cancellable refreshmoneromooo-monero2-7/+7
^C while in manual refresh will cancel the refresh, since that's often an annoying thing to have to wait for. Also, a manual refresh command will interrupt any running background refresh and take over, rather than wait for the background refresh to be done, and look to be hanging.
2015-11-25util: use putenv instead of setenv for mingwmoneromooo-monero1-0/+5
2015-11-21Fix startup crash when using a locale boost does not likemoneromooo-monero2-0/+21
There are various locale related bugs in various versions of boost, where exceptions are thrown in boost::filesystem APIs when the current locale is not to boost's liking. It's not clear what "not to boost's liking" means in detail, though "en" and "en_US.UTF-8" are not to its liking. Fix it by running a test function that's known to throw in such a case, and resetting LANG and LC_ALL to C if an exception is thrown. In simplewallet, the locale is queried before that so the correct translations will still be used.
2015-11-21i18n: allow language to be passed as a parametermoneromooo-monero2-5/+7
If empty, it will still be fetched from the environment
2015-10-27common: const and init list pedantrymoneromooo-monero2-2/+3
2015-09-27dns_utils: fix wrong assertsmoneromooo-monero1-2/+2
Braino.
2015-08-30dns_utils: remove unnecessary string conversionmoneromooo-monero1-5/+2
2015-08-30dns_utils: factor the fetching code for different DNS record typesmoneromooo-monero2-59/+34
2015-08-30dns_utils: simplify string handling and fix leakmoneromooo-monero1-5/+1
2015-08-27dns_utils: add a const where possiblemoneromooo-monero2-2/+2
2015-08-27dns_utils: lock access to the singletonmoneromooo-monero1-0/+4
This avoids races which could result in two objects being created
2015-08-27dns: make ctor privatemoneromooo-monero2-1/+15
This ensures one can't instanciate a DNSResolver object by mistake, but uses the singleton. A separate create static function is added for cases where a new object is explicitely needed.
2015-07-15Add missing file - i18n.cppmoneromooo-monero1-0/+297
2015-07-14Translatable strings for simplewalletmoneromooo-monero2-2/+40
The system is mostly the Qt system, but we don't use Qt to avoid the dependencies. See README.i18n for details.
2015-06-20Set dnssec_valid value correctly in dns_utils; fix address_from_url testRostislav1-3/+3
2015-06-07dns_utils: simpify smart pointer use, and use for url strings toomoneromooo-monero2-39/+46
OK, I admit I wanted to template this struct for fun too.
2015-05-31cleaning up, removing redundant files, renaming, fixing incorrect licensesRiccardo Spagni3-0/+84
2015-05-19Allow name@domain.tld for OpenAlias lookupswarptangent2-0/+25
Based on tewinget's update. Make OpenAlias address format independent of existing DNS functions. Add tests. Test: make debug-test cd build/debug/tests/unit_tests # test that regular DNS functions work, including IPv4 lookups. # also test function that converts OpenAlias address format make && ./unit_tests --gtest_filter=DNSResolver* # test that OpenAlias addresses like donate@getmonero.org work from # wallet tools make && ./unit_tests --gtest_filter=AddressFromURL.Success
2015-05-19Revert "Allow name@domain.tld for OpenAlias lookups"warptangent2-25/+14
This reverts commit b18368b635ba08aea541ef52ebc74180822644a2.
2015-04-29Allow name@domain.tld for OpenAlias lookupsThomas Winget2-14/+25
2015-04-10[fix] log level change. compilation: dns, testsrfree2monero1-1/+1
old unbound #warning does not block compilation unit tests build fine. Even though the RPC/P2P network type is required again
2015-04-02Fixed DNS resolution bug in WindowsThomas Winget1-4/+2
Due to a bug in unbound, we were passing a string containing a null character to ub_ctx_resolvconf and ub_ctx_hosts rather than a NULL pointer. On *nix this wasn't causing headache, but on Windows this was causing unbound to not correctly load DNS settings from the OS. Note on the bug: in a Windows-specific code branch in the function ub_ctx_hosts(), if the hosts file specified was a NULL pointer, a call to getenv() was stored in a local char* and later freed. This is incorrect, as we do not own that data, and caused the program to crash.
2015-04-01remerged; commands JSON. logging upgrade. doxygenrfree2monero3-1/+24
2015-03-24DNSSEC added (hardcoded key)Thomas Winget1-0/+66
DNSSEC is now implemented with the hardcoded key from unbound. This will need to be not hardcoded in the future, but is okay for now. Unit tests updated for DNSSEC (as well as for the fact that, contrary to previous assumption, example.com does not have a static IP address).
2015-03-20Hopefully fixes build on WindowsThomas Winget2-1/+13
2015-02-242014 network limit 1.3 fix log/path/data +utilsrfree2monero1-1/+1
+toc -doc -drmonero Fixed the windows path, and improved logging and data (for graph) logging, fixed some locks and added more checks. Still there is a locking error, not added by my patches, but present in master version (locking of map/list of peers).
2015-02-24Daemonize changes pulled in -- daemon buildsThomas Winget4-0/+272
many RPC functions added by the daemonize changes (and related changes on the upstream dev branch that were not merged) were commented out (apart from return). Other than that, this *should* work...at any rate, it builds, and that's something.
2015-01-02year updated in licenseRiccardo Spagni14-14/+14
2014-12-01moved rapidjson to external folder, fixed CMakeRiccardo Spagni24-8020/+0
2014-10-24cmake: support 2.8.7Ben Boeckel1-1/+1
Older versions of CMake support LINK_{PUBLIC,PRIVATE} while newer versions prefer PUBLIC and PRIVATE instead, but still support the LINK_ prefix.
2014-10-23cmake: handle private vs. public headersBen Boeckel1-2/+10
2014-10-23cmake: refactor common code with librariesBen Boeckel1-9/+1
2014-10-23cmake: put each library into its own directoryBen Boeckel1-0/+64
This cleans up the CMake code and shows patterns more easily (to be refactored in the next commit).