aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-03-12rpc: do not return bans if they're effectively spentmoneromooo-monero1-4/+7
The blocked ip list will still hold them till next time a connection attempt is made with that IP, so the effective length of the ban may be negative.
2016-03-12p2p: lock access to the blocked ips mapmoneromooo-monero2-3/+3
2016-03-11Merge pull request #712Riccardo Spagni30-103/+110
66c2fc7 Need to link boost::chrono in more places now (Howard Chu) b937a2c Use boost::thread instead of std::thread (Howard Chu)
2016-03-11Merge pull request #711Riccardo Spagni2-1/+8
52056dc WIN32 thread_id is OS-dependent not compiler-dependent (Howard Chu) 87d39f3 WIN32: Need getpid() declaration (Howard Chu)
2016-03-11Merge pull request #710Riccardo Spagni1-14/+14
8941ce0 More for bdec7cb (Howard Chu)
2016-03-11Need to link boost::chrono in more places nowHoward Chu3-0/+3
2016-03-11WIN32 thread_id is OS-dependent not compiler-dependentHoward Chu1-1/+7
2016-03-11Use boost::thread instead of std::threadHoward Chu27-103/+107
and all other associated IPC
2016-03-11WIN32: Need getpid() declarationHoward Chu1-0/+1
2016-03-09More for bdec7cbHoward Chu1-14/+14
More uses of db error helper
2016-03-05Merge pull request #705Riccardo Spagni1-4/+54
f7ed167 blockchain_utilities: Update documentation (warptangent)
2016-03-05Merge pull request #704Riccardo Spagni1-8/+17
e2b7e55 get_payments short ID (luigi1111)
2016-03-05Merge pull request #703Riccardo Spagni1-1/+1
dfca2ae unit_tests: fix hard fork unit test compilation (warptangent)
2016-03-05Merge pull request #702Riccardo Spagni2-6/+67
0485d17 blockchain_export: Support BerkeleyDB (warptangent) 41487e3 blockchain_export: Move DB implementation includes (warptangent)
2016-03-05blockchain_utilities: Update documentationwarptangent1-4/+54
2016-03-05Merge pull request #700Riccardo Spagni2-34/+35
bdec7cb BlockchainLMDB: Use DB error helper consistently (warptangent) c5932eb BlockchainLMDB: Add DB error to exception (warptangent) a49c355 Blockchain: Omit verbose time stats messages by default (warptangent)
2016-03-05Merge pull request #698Riccardo Spagni1-57/+14
ee7a8b8 Get rid of lmdb_cur (Howard Chu)
2016-03-05Merge pull request #696Riccardo Spagni1-1/+1
d57ec75 Fix language (Howard Chu)
2016-03-05Merge pull request #695Riccardo Spagni1-0/+6
f5affbe More for df239428c0f43e2664f2be273996a734ca12c686 (Howard Chu)
2016-03-05get_payments short IDluigi11111-8/+17
Add support for short/integrated/encrypted IDs to get_payments RPC
2016-03-05unit_tests: fix hard fork unit test compilationwarptangent1-1/+1
Match changed BlockchainDB function declaration.
2016-03-05blockchain_export: Support BerkeleyDBwarptangent1-4/+65
TEST: blockchain_export -h This should show "berkeley" as an available option to --database. With an existing BerkeleyDB database, run: blockchain_export --database berkeley
2016-03-05blockchain_export: Move DB implementation includeswarptangent2-2/+2
2016-03-03BlockchainLMDB: Use DB error helper consistentlywarptangent1-28/+27
2016-03-03BlockchainLMDB: Add DB error to exceptionwarptangent1-5/+7
2016-03-03Blockchain: Omit verbose time stats messages by defaultwarptangent1-1/+1
This is already the default for the daemon, but by checking a command line argument and calling a Blockchain member function setter. Initialize the variable to false so it's not dependent on an external command-line argument check. This allows utilities like blockchain_import to have a reasonable default without code changes.
2016-03-03Get rid of lmdb_curHoward Chu1-57/+14
We don't need it now with per-txn cursors.
2016-03-03Fix languageHoward Chu1-1/+1
2016-03-03More for df239428c0f43e2664f2be273996a734ca12c686Howard Chu1-0/+6
Let ARMv7 work again
2016-03-01Merge pull request #693Riccardo Spagni1-1/+1
2c823c1 Make partial revert consistent (warptangent)
2016-03-01Make partial revert consistentwarptangent1-1/+1
If user-defined comparator is used, subdb shouldn't be opened with MDB_INTEGERKEY. TODO: Again, this will be added back with future schema updates.
2016-02-29Merge pull request #692Riccardo Spagni1-3/+15
df23942 Revert part of 7db89ed2eee2ce31f039783323d665fe7c24d441 (warptangent) c9c4060 BlockchainLMDB: Add height and db error to exception (warptangent)
2016-02-29Revert part of 7db89ed2eee2ce31f039783323d665fe7c24d441warptangent1-2/+14
For now, so existing databases work. TODO: add these back with future schema updates.
2016-02-29BlockchainLMDB: Add height and db error to exceptionwarptangent1-1/+1
2016-02-29Merge pull request #689Riccardo Spagni1-1/+1
5ab33ca unit_tests: update test openalias address (moneromooo-monero)
2016-02-29Merge pull request #688Riccardo Spagni6-20/+172
c2a1fee simplewallet: prompt for private keys when generating wallets (moneromooo-monero) 4513b4c simplewallet: add a new --restore-from-keys option (moneromooo-monero)
2016-02-29Merge pull request #687Riccardo Spagni18-37/+13
5e3557d move g_test_dbg_lock_sleep from a global to a function level static (moneromooo-monero)
2016-02-29Merge pull request #686Riccardo Spagni8-197/+379
7db89ed ARMv7: fix unaligned accesses (Howard Chu) 5a07cef Wrap some more actions in a larger read txn (Howard Chu) 8cc7a36 read txn/cursor stuff (Howard Chu) 86a7f2b core: check whether an update is needed straight away (moneromooo-monero) ea5fa5e core: print "update needed" hard fork notifications in red (moneromooo-monero)
2016-02-29Merge pull request #684Riccardo Spagni1-22/+16
283894d dns_utils: const compatibility with older libunbound (moneromooo-monero)
2016-02-27simplewallet: prompt for private keys when generating walletsmoneromooo-monero1-32/+33
instead of supplying them on the command line. It's more unwieldy, but better protects against information leaks.
2016-02-25ARMv7: fix unaligned accessesHoward Chu1-20/+15
And cleanup some key comparators
2016-02-23unit_tests: update test openalias addressmoneromooo-monero1-1/+1
It was recently changed
2016-02-23Wrap some more actions in a larger read txnHoward Chu1-11/+25
2016-02-23read txn/cursor stuffHoward Chu8-166/+339
Could wrap more later.
2016-02-23core: check whether an update is needed straight awaymoneromooo-monero1-1/+1
2016-02-23core: print "update needed" hard fork notifications in redmoneromooo-monero1-2/+2
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-22simplewallet: add a new --restore-from-keys optionmoneromooo-monero6-6/+157
It is similar in use to --restore-from-view-key, but also expects a spend private key. Requested by luigi1112, and useful to restore MyMonero wallets.
2016-02-22move g_test_dbg_lock_sleep from a global to a function level staticmoneromooo-monero18-37/+13
This avoids the need to define that variable in every program which uses epee.
2016-02-20Merge pull request #681Riccardo Spagni1-0/+1
0eb4d05 db_bdb: add missing include for std::condition_variable (moneromooo-monero)
2016-02-20db_bdb: add missing include for std::condition_variablemoneromooo-monero1-0/+1
2016-02-20Merge pull request #680Riccardo Spagni1-3/+12
360f72f simplewallet: wording change for single tx confirmation (moneromooo-monero)
2016-02-20Merge pull request #678Riccardo Spagni7-14/+15
11d555c Fix crash in std::map for connections_map (Howard Chu) 014f886 std::condvar is broken on Win32 with gcc/g++ 4.8 too (Howard Chu) 7c86c59 Use boost::thread instead of std::thread (Howard Chu)
2016-02-20Merge pull request #677Riccardo Spagni1-4/+85
57e75fa BlockchainBDB: Check if hard fork subdbs need reset (warptangent) 47f6cf8 BlockchainBDB: Support blockchain_import --drop-hard-fork command (warptangent)
2016-02-20Merge pull request #676Riccardo Spagni1-4/+4
d258f6e blockchain_import: Pass ARCH_WIDTH macro if 32-bit or not. (warptangent)
2016-02-20simplewallet: wording change for single tx confirmationmoneromooo-monero1-3/+12
2016-02-18Fix crash in std::map for connections_mapHoward Chu1-1/+2
Use boost::unordered_map instead.
2016-02-18std::condvar is broken on Win32 with gcc/g++ 4.8 tooHoward Chu2-8/+6
Use boost...
2016-02-18Use boost::thread instead of std::threadHoward Chu4-5/+7
std::thread crashes on (at least) ARMv6 g++ 4.8/4.9
2016-02-18BlockchainBDB: Check if hard fork subdbs need resetwarptangent1-1/+50
See f7e337e6254c1c4115a8430964a6f6b54305b3ae for LMDB equivalent.
2016-02-18BlockchainBDB: Support blockchain_import --drop-hard-fork commandwarptangent1-3/+35
See c657e772c4efbfee8ff698883f1532a38117a70a for LMDB equivalent.
2016-02-18blockchain_import: Pass ARCH_WIDTH macro if 32-bit or not.warptangent1-4/+4
This also avoids warnings.
2016-02-18Merge pull request #675Riccardo Spagni2-3/+3
27d4e50 core: check whether an update is needed straight away (moneromooo-monero) 8892173 core: print "update needed" hard fork notifications in red (moneromooo-monero)
2016-02-18Merge pull request #674Riccardo Spagni3-4/+14
05e7ac0 blockchain_import: Check bit width for more than just WIN32 (warptangent)
2016-02-18Merge pull request #673Riccardo Spagni3-19/+50
9218cad Fix cffc411c9025e1d28a8b6e32c53c83ba113d9204 (Howard Chu) 8860b74 MDB_VL32 - increase max write txn size (Howard Chu) 02abe35 Use MDB_PREV_MULTIPLE (Howard Chu) 7a4755d Fixup after lmdb master resync (Howard Chu)
2016-02-17core: check whether an update is needed straight awaymoneromooo-monero1-1/+1
2016-02-17core: print "update needed" hard fork notifications in redmoneromooo-monero1-2/+2
2016-02-17Fix cffc411c9025e1d28a8b6e32c53c83ba113d9204Howard Chu1-0/+2
Don't include bdb header unless defined(BERKELEY_DB)
2016-02-17MDB_VL32 - increase max write txn sizeHoward Chu1-1/+1
2016-02-17blockchain_import: Check bit width for more than just WIN32warptangent3-4/+14
Pass the CMake bit width setting to compile flags for blockchain_import and blockchain_converter. For LMDB on 32-bit, hyc has found that batch size of 100 appears to be a good default.
2016-02-17Use MDB_PREV_MULTIPLEHoward Chu1-12/+41
in get_global_output_indices
2016-02-17Fixup after lmdb master resyncHoward Chu1-6/+6
2016-02-17Merge pull request #672Riccardo Spagni3-27/+114
3b13a74 Shutup about VERSION 0 (Howard Chu) 1537477 Use cursor in get_output_key (Howard Chu) f2faf8c Use MDB_APPEND mode where possible (Howard Chu) 090b548 Use cursors in write txns (Howard Chu) ed08d21 Keep a running blocksize count (Howard Chu) 0fc9334 Win32 import batchsize tweaks (Howard Chu)
2016-02-17Merge pull request #671Riccardo Spagni1-0/+4
8f09b71 wallet: clear missing data on rescan_bc (moneromooo-monero)
2016-02-17Merge pull request #666Riccardo Spagni2-50/+160
27f76e2 blockchain_import: Build string for db type list (warptangent) 1aa8a9d blockchain_import: Add mode argument representing multiple DB flags (warptangent) cffc411 blockchain_import: Support BerkeleyDB (warptangent) 19c1aaa blockchain_import: Add database type argument (warptangent) 0fedce0 blockchain_import: Make LMDB-specific names general (warptangent)
2016-02-17Merge pull request #665Riccardo Spagni2-23/+76
31e4e8c Resync with master (Howard Chu)
2016-02-17Merge pull request #664Riccardo Spagni2-3/+21
d8f9bb3 Keep a running blocksize count (Howard Chu) bf22109 Win32 import batchsize tweaks (Howard Chu)
2016-02-17Merge pull request #660Riccardo Spagni1-1/+1
1402a52 epee: always call the PRNG through the locked API (moneromooo-monero)
2016-02-17Merge pull request #659Riccardo Spagni1-1/+1
d56b2e5 core_tests: fix a compile problem with CLANG (moneromooo-monero)
2016-02-17Shutup about VERSION 0Howard Chu2-2/+6
2016-02-17Use cursor in get_output_keyHoward Chu1-1/+2
2016-02-17Use MDB_APPEND mode where possibleHoward Chu1-5/+9
When keys are contiguous and monotonically increasing, this gets denser page utilization (doesn't leave padding in page splits). Can't be used for keys that are inserted in random order (e.g. hashes) In total this only saves around 1.5% of space compared to original DB code. The previous patch accounted for 0.8% savings on its own; the blocks tables just aren't that big.
2016-02-17Use cursors in write txnsHoward Chu2-22/+100
Saves a bit of seek overhead. LMDB frees them automatically in txn_(commit|abort) so they need no cleanup.
2016-02-17Keep a running blocksize countHoward Chu2-0/+15
Used in batch size estimation, avoids rereading already processed blocks during import
2016-02-17Win32 import batchsize tweaksHoward Chu1-3/+6
Reduce frequency of resizes: bump minimum increase from 128MB to 512MB Use a bigger safety margin at small batch sizes
2016-02-16Resync with masterHoward Chu2-23/+76
2016-02-15wallet: clear missing data on rescan_bcmoneromooo-monero1-0/+4
2016-02-14blockchain_import: Build string for db type listwarptangent1-2/+15
2016-02-14blockchain_import: Add mode argument representing multiple DB flagswarptangent1-31/+82
These modes match those optionally provided as part of the daemon's --db-type argument. Argument after the # is interpreted as a composite mode if there's only one (no comma separated arguments). Sample usage: blockchain_import --database lmdb#fastest blockchain_import --database berkeley#fastest Multiple specific DB flags are still supported, e.g. blockchain_import --database lmdb#nosync,nordahead blockchain_import --database berkeley#txn_nosync
2016-02-15Keep a running blocksize countHoward Chu2-0/+15
Used in batch size estimation, avoids rereading already processed blocks during import
2016-02-14blockchain_import: Support BerkeleyDBwarptangent2-21/+67
2016-02-14blockchain_import: Add database type argumentwarptangent2-4/+4
Default to LMDB.
2016-02-14blockchain_import: Make LMDB-specific names generalwarptangent2-33/+33
Also update terms to better distinguish blockchain management/engine from database type.
2016-02-14Win32 import batchsize tweaksHoward Chu1-3/+6
Reduce frequency of resizes: bump minimum increase from 128MB to 512MB Use a bigger safety margin at small batch sizes
2016-02-13epee: always call the PRNG through the locked APImoneromooo-monero1-1/+1
2016-02-13core_tests: fix a compile problem with CLANGmoneromooo-monero1-1/+1
It doesn't like const objects from classes that do not have a user defined ctor, apparently. Reported by othe.
2016-02-13Merge pull request #658Riccardo Spagni2-0/+295
c7cfc76 Add the new test files (moneromooo-monero)
2016-02-13Add the new test filesmoneromooo-monero2-0/+295
Forgot to add them before commit
2016-02-13Merge pull request #657Riccardo Spagni2-12/+50
1995923 BlockchainLMDB: Deal with DB exceptions at block level with particularity (warptangent) c16cc20 BlockchainLMDB: Add sanity check for inconsistent state (warptangent) 9118d0a BlockchainLMDB: Call destructor on allocated txn if setup fails (warptangent) f5581c3 BlockchainLMDB: Replace remaining txn pointer NULLs with nullptr (warptangent)
2016-02-13Merge pull request #656Riccardo Spagni4-10/+12
9832d18 cmake: Include OpenSSL libraries in static linking (warptangent) c2f2437 cmake: Remove unused variable (warptangent) 7205210 cmake: Fix unbound config compile settings (warptangent) 3e72d97 cmake: Fix overly broad use of dynamic link settings (warptangent)
2016-02-13Merge pull request #652Riccardo Spagni1-1/+21
c7e6b77 crypto: only check MONERO_USE_SOFTWARE_AES once (moneromooo-monero) 74aef21 crypto: use software AES based on the MONERO_USE_SOFTWARE_AES env var (moneromooo-monero)
2016-02-13Merge pull request #651Riccardo Spagni17-35/+77
5cb03a1 unit_tests: fix blockchain unit test after hard fork import fix (moneromooo-monero) 759383c hardfork: add a default fork entry for v1 if none exist (moneromooo-monero) c7f82ec blockchain: initialize m_hardfork to NULL (moneromooo-monero) 8649b9f blockchain_db: pass hard fork object as a simple pointer (moneromooo-monero) a333c42 core_tests: add tests for hard fork behaviors (MRL-0004) (moneromooo-monero) 945fe90 core_tests: allow setting miner tx max_outs when creating a block (moneromooo-monero) 8e4c2e6 unit_tests: fix hard fork unit test compilation (moneromooo-monero) 9ef5794 blockchain_utilities: remove unused num_blocks variable (moneromooo-monero) 6c8e5c3 blockchain: reset hardfork object when resetting blockchain (moneromooo-monero)
2016-02-13BlockchainLMDB: Deal with DB exceptions at block level with particularitywarptangent2-2/+21
Add another DB error exception type to distinguish failed txn setup from general use of txn. This keeps the error handling flow the same as before the block-level txn setup changes that moved control up a layer to BlockchainDB.
2016-02-13BlockchainLMDB: Add sanity check for inconsistent statewarptangent1-2/+13
This hasn't been known to occur in block-level txn abort, but throw exception if it does.
2016-02-13BlockchainLMDB: Call destructor on allocated txn if setup failswarptangent1-0/+8
2016-02-13BlockchainLMDB: Replace remaining txn pointer NULLs with nullptrwarptangent1-9/+9
For consistency.
2016-02-12cmake: Include OpenSSL libraries in static linkingwarptangent3-6/+11
2016-02-12cmake: Remove unused variablewarptangent1-1/+1
DL is empty and unused elsewhere. The intention at one point may have been to use CMAKE_DL_LIBS, but that would more likely apply in some situations involving static linking.
2016-02-12cmake: Fix unbound config compile settingswarptangent2-0/+6
This allows the OpenSSL function checks to compile in unbound's CMake configuration. Otherwise, the functions SHA256() and EVP_sha512() won't be called from libunbound as possible algorithms. They had not been compiling because static OpenSSL libraries were being used, along with lack of -ldl. The static library preference is unnecessary for the checks, so use default suffixes ordering for CMAKE_FIND_LIBRARY_SUFFIXES when building unbound. Related files: configure_checks.cmake external/unbound/validator/val_secalgo.c secalgo_ds_digest(), setup_key_digest()
2016-02-12cmake: Fix overly broad use of dynamic link settingswarptangent1-9/+0
Remove LINK_SEARCH_START_STATIC and LINK_SEARCH_END_STATIC. This is more appropriate when the compiler flag -static is used. This had been causing CMake to omit the linker flags necesssary to distinguish static and dynamic library linking. CMake had assumed static linking for the target, causing it to omit explicit static link flags. That is problematic without the -static compile flag being set. With a library located in system directories, like libboost_date_time, the full static path (.a), though found correctly by CMake, was treated by the linker as a dynamic library. This is because target_link_libraries() transforms the full path to -l<libname> if it's in a system directory. Without -static or explicit linker flags, the dynamic library (.so) is linked. Removing the above two properties removes the assumption of static. So -Wl;-Bstatic is inserted where needed. This causes -l<libname> to properly refer to the static library instead of dynamic.
2016-02-09crypto: only check MONERO_USE_SOFTWARE_AES oncemoneromooo-monero1-5/+15
2016-02-09crypto: use software AES based on the MONERO_USE_SOFTWARE_AES env varmoneromooo-monero1-1/+11
Setting to no or 0 also works. If set, any other value enables it. Useful for running with valgrind in cases where it fails at properly implementing AES-NI.
2016-02-08unit_tests: fix blockchain unit test after hard fork import fixmoneromooo-monero1-1/+10
2016-02-08hardfork: add a default fork entry for v1 if none existmoneromooo-monero1-0/+5
To avoid special cases
2016-02-08blockchain: initialize m_hardfork to NULLmoneromooo-monero1-1/+1
It can now be set by some other code, and is thus tested
2016-02-08blockchain_db: pass hard fork object as a simple pointermoneromooo-monero2-2/+2
2016-02-08core_tests: add tests for hard fork behaviors (MRL-0004)moneromooo-monero10-25/+48
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-02-08core_tests: allow setting miner tx max_outs when creating a blockmoneromooo-monero2-4/+6
2016-02-08unit_tests: fix hard fork unit test compilationmoneromooo-monero1-0/+4
2016-02-08blockchain_utilities: remove unused num_blocks variablemoneromooo-monero1-2/+0
2016-02-08blockchain: reset hardfork object when resetting blockchainmoneromooo-monero1-0/+1
Not doing so will prevent the new genesis block from being reset if a switch past v1 had occured already.
2016-02-08Merge pull request #650Riccardo Spagni8-34/+130
e298b14 Blockchain: Update comments on removing block (warptangent) b368e29 blockchain_import: Get hard fork version from HardFork (warptangent) e02577f Move HardFork DB update to BlockchainDB::add_block() (warptangent) 3800875 Make HardFork object available to BlockchainDB and derived DB implementations (warptangent) fd46c96 BlockchainDB/LMDB: Refactor block-scope DB txn handling for add block (warptangent) f3a6000 BlockchainDB/LMDB/BDB: Extract DB txn functions for block add/remove (warptangent) f47d5b0 BlockchainLMDB: Allow two HardFork functions to update DB during block add (warptangent) 15ee0be BlockchainLMDB: extract txn macros used during block add/remove (warptangent)
2016-02-08Blockchain: Update comments on removing blockwarptangent1-0/+5
2016-02-08blockchain_import: Get hard fork version from HardForkwarptangent1-4/+1
Replace temporary assignment that used hardcoded values.
2016-02-08Move HardFork DB update to BlockchainDB::add_block()warptangent3-6/+1
Ensures the database is consistent. Also simplifes blockchain_import in that verify mode off has less to work around.
2016-02-08Make HardFork object available to BlockchainDB and derived DB implementationswarptangent5-0/+18
This will later allow the HardFork object's DB update functions to be called when the DB transaction that persists across block add/remove is open.
2016-02-08BlockchainDB/LMDB: Refactor block-scope DB txn handling for add blockwarptangent2-20/+10
Move block-scope txn start and stop from BlockchainLMDB to BlockchainDB.
2016-02-08BlockchainDB/LMDB/BDB: Extract DB txn functions for block add/removewarptangent5-0/+65
2016-02-08BlockchainLMDB: Allow two HardFork functions to update DB during block addwarptangent1-4/+4
Note that this doesn't yet cause them to be called during block add.
2016-02-08BlockchainLMDB: extract txn macros used during block add/removewarptangent1-0/+26
2016-02-08Merge pull request #644Riccardo Spagni9-8/+81
9d62c16 blockchain_import: Add hard fork data for each block when verify mode is off (warptangent) 7006b2e blockchain_utilities: Have fake_core create HardFork object (warptangent) 8f863e7 Blockchain: Optionally pass in HardFork object (warptangent) f7e337e fake_core: Check if hard fork subdbs need reset at start (warptangent) c657e77 blockchain_import: Add --drop-hard-fork command (warptangent) 4122439 blockchain_import: Add exception to log output (warptangent)
2016-02-08blockchain_import: Add hard fork data for each block when verify mode is offwarptangent1-0/+3
2016-02-08blockchain_utilities: Have fake_core create HardFork objectwarptangent1-1/+13
The HardFork object is needed for the importer to update the hard fork data when verify mode is off.
2016-02-08Blockchain: Optionally pass in HardFork objectwarptangent2-4/+21
2016-02-08fake_core: Check if hard fork subdbs need reset at startwarptangent2-2/+11
2016-02-08blockchain_import: Add --drop-hard-fork commandwarptangent6-0/+32
2016-02-08blockchain_import: Add exception to log outputwarptangent1-1/+1
2016-02-08Merge pull request #648Riccardo Spagni1-0/+11
f6abc53 simplewallet: check watch-only view key matches standard address (moneromooo-monero)
2016-02-08Merge pull request #646Riccardo Spagni1-12/+49
c7b96b9 wallet: check a key image isn't already present when adding one (moneromooo-monero)
2016-02-08Merge pull request #645Riccardo Spagni1-1/+0
d9f4b39 daemon: remove leftover debug log (moneromooo-monero)
2016-02-08Merge pull request #643Riccardo Spagni1-8/+10
05bfb51 core: move the db lock to the data directory (moneromooo-monero)
2016-02-08Merge pull request #641Riccardo Spagni4-71/+98
7658ac0 blockchain: revert handle_get_objects adding block id on tx not found (moneromooo-monero) 3a0f4d8 berkeleydb: fix delete/free mismatch (moneromooo-monero) 1642be2 minor bugfixes and refactoring (Thomas Winget) 098dcf2 unit_tests: fix mnemonics unit test testing invalid seeds (moneromooo-monero)
2016-02-08Merge pull request #640Riccardo Spagni1-2/+11
3d1e690 Add make option to disable BerkeleyDB (warptangent)
2016-02-08Merge pull request #639Riccardo Spagni2-31/+72
119eb10 unit_tests: fix hard fork unit tests and add a test for major too (moneromooo-monero) 64a2aa3 hardfork: allow passing chain height in get(height) for convenience (moneromooo-monero)
2016-02-08Merge pull request #638Riccardo Spagni1-1/+1
6827061 tests: fix compilation failure after V1 define rename (moneromooo-monero)
2016-02-05simplewallet: check watch-only view key matches standard addressmoneromooo-monero1-0/+11
2016-02-05daemon: remove leftover debug logmoneromooo-monero1-1/+0
2016-02-05wallet: check a key image isn't already present when adding onemoneromooo-monero1-12/+49
If it is, it points to reuse of a tx key, which isn't meant to happen. If it does, a key image collision means that only one of those outputs is spendable, so the wallet selects the larger amount, unless that output was spent already. This causes a discrepancy betewen reported received inputs and payment total. Since tx keys are 256 bits, this should never happen except if done on purpose, or if a sender uses a bad PRNG.
2016-02-04core: move the db lock to the data directorymoneromooo-monero1-8/+10
Locking just one db turns out to not have been a good idea, since the pool and p2p state fdles have to be used anyway. Also ensure the directory exists before tring to lock.
2016-02-03blockchain: revert handle_get_objects adding block id on tx not foundmoneromooo-monero1-1/+0
This differs from the original CN code, and there seems to be no reason to include the block itself, if it was found
2016-02-03berkeleydb: fix delete/free mismatchmoneromooo-monero1-2/+2
Despite being C++, the stats object is allocated by the underlying C layer using malloc(3).
2016-02-02minor bugfixes and refactoringThomas Winget2-56/+88
- Blockchain should store if it's running on testnet or not - moved loading compiled-in block hashes to its own function for clarity - on handle_get_objects, should now correctly return false if a block's transactions are missing - replace instances of BOOST_FOREACH with C++11 for loops in Blockchain.
2016-02-01Add make option to disable BerkeleyDBwarptangent1-2/+11
Sample use: BERKELEY_DB=0 make debug This makes development with BlockchainLMDB easier when virtual methods have changed and don't match BlockchainBDB.
2016-02-01unit_tests: fix mnemonics unit test testing invalid seedsmoneromooo-monero1-13/+9
Some word triplets, such as "mugged names nail", are not valid results from any 32 bit value. If used to decode a 32 bit value, the result will therefore encode to a different word triplet. Fix this by using random words converted from an actual random bitstring, ensuring we always get valid triplets.
2016-02-01unit_tests: fix hard fork unit tests and add a test for major toomoneromooo-monero1-30/+68
2016-02-01hardfork: allow passing chain height in get(height) for conveniencemoneromooo-monero1-1/+4
2016-01-31tests: fix compilation failure after V1 define renamemoneromooo-monero1-1/+1
2016-01-31Merge pull request #636Riccardo Spagni1-9/+1
616df49 Revert "Merge pull request #632" (Riccardo Spagni)
2016-01-31Revert "Merge pull request #632"Riccardo Spagni1-9/+1
This reverts commit 58f890652e86039e98dff2d48d217c9ea9e84eca, reversing changes made to 39d73d2a27730e6a5844c259d81a0ed9d4ee3000.
2016-01-31Merge pull request #635Riccardo Spagni2-0/+46
8b3539b core: prevent the database from being used by multiple daemons (moneromooo-monero)
2016-01-31Merge pull request #634Riccardo Spagni3-5/+15
7fc6fa3 wallet: forbid dust altogether in output selection where appropriate (moneromooo-monero) 5e1a739 blockchain: log number of outputs available for a new tx (moneromooo-monero)
2016-01-31Merge pull request #633Riccardo Spagni1-0/+2
80882ac wallet: guard against exception in process_blocks (moneromooo-monero)
2016-01-31Merge pull request #632Riccardo Spagni1-1/+9
2cf8b32 wallet: guard against exception in process_blocks (moneromooo-monero)
2016-01-31Merge pull request #631Riccardo Spagni6-44/+51
bcac101 daemon: fix a few issues reported by valgrind (moneromooo-monero) a7e8174 tx_pool: fix serialization of new relayed data (moneromooo-monero) 601ad76 hardfork: fix mixup in indexing variable in get_voting_info (moneromooo-monero) 444e22f blockchain: remove unused timer (moneromooo-monero) 7edfdd8 blockchain: fix m_sync_counter uninitialized variable use (moneromooo-monero) d97582c epee: use generate_random_bytes for new random uuids (moneromooo-monero) 17c7c9c epee: remove dodgy random code that nobody uses (moneromooo-monero)
2016-01-31Merge pull request #630Riccardo Spagni17-8/+274
bf6d147 new flush_txpool command, and associated RPC call (moneromooo-monero) 6288295 rpc: add missing return on error when getting a tx (moneromooo-monero) b7e37b7 simplewallet: show_transfers can now show just failed txes (moneromooo-monero) b11539f wallet: detect and handle failed outgoing transfers (moneromooo-monero) 4b23714 tx_pool: serialize missing kept_by_block flag (moneromooo-monero)
2016-01-31core: prevent the database from being used by multiple daemonsmoneromooo-monero2-0/+46
A boost lock is used to determine whether more than one process wants to access the database. The boost file_lock doesn't seem to like locking directories, so we use an arbitrary file in it. This allows to still run two daemons if they have different database directories (ie, LMDB/BDB, different data directories).
2016-01-31wallet: forbid dust altogether in output selection where appropriatemoneromooo-monero2-5/+14
2016-01-31blockchain: log number of outputs available for a new txmoneromooo-monero1-0/+1
2016-01-30wallet: guard against exception in process_blocksmoneromooo-monero1-0/+2
If an exception occurs, the thread needs to be joined, or it will be deleted while still live, and terminate the process.
2016-01-30wallet: guard against exception in process_blocksmoneromooo-monero1-1/+9
If an exception occurs, the thread needs to be joined, or it will be deleted while still live, and terminate the process.
2016-01-30daemon: fix a few issues reported by valgrindmoneromooo-monero1-29/+43
In particular, ensure we check the status of RPC response structures, as some functions will return success, but with a BUSY status, when the daemon is not yet synced, and the response will not filled.
2016-01-30tx_pool: fix serialization of new relayed datamoneromooo-monero1-2/+0
2016-01-30hardfork: fix mixup in indexing variable in get_voting_infomoneromooo-monero1-1/+1
2016-01-30blockchain: remove unused timermoneromooo-monero1-1/+0
2016-01-30blockchain: fix m_sync_counter uninitialized variable usemoneromooo-monero1-1/+1
It counts the number of blocks added since last zeroing
2016-01-30epee: use generate_random_bytes for new random uuidsmoneromooo-monero1-1/+6
Instead of using boost::uuids::generate_random, which uses uninitialized stuff *on purpose*, just to annoy people who use valgrind
2016-01-30epee: remove dodgy random code that nobody usesmoneromooo-monero1-9/+0
in case someone might want to use it
2016-01-30new flush_txpool command, and associated RPC callmoneromooo-monero12-0/+175
It can flush a particular tx, or the whole pool (the RPC command can flush a list of transactions too)
2016-01-30rpc: add missing return on error when getting a txmoneromooo-monero1-0/+1
2016-01-30simplewallet: show_transfers can now show just failed txesmoneromooo-monero1-6/+13
2016-01-29wallet: detect and handle failed outgoing transfersmoneromooo-monero4-3/+83
When a transaction is not found in the pool anymore, it is marked as failed, and displayed as such in show_transfers.
2016-01-29tx_pool: serialize missing kept_by_block flagmoneromooo-monero1-1/+4
2016-01-29Merge pull request #629Riccardo Spagni13-48/+105
94b98fb tx_pool: do not accept txes not in a block if they timed out before (moneromooo-monero) eadbdf3 tx_pool: fix use of invalidated iterator (moneromooo-monero) 3b1d7e0 Fix V1/V2 use of hard fork related parameters (moneromooo-monero)
2016-01-29Merge pull request #628Riccardo Spagni1-17/+52
b8cc6d4 BlockchainBDB: Continue when tx has no outputs (warptangent) b870746 BlockchainBDB: When removing, find amount output index fast by starting at end (warptangent) 1a5c3fa BlockchainBDB: Remove tx outputs in reverse order (warptangent)
2016-01-29Merge pull request #627Riccardo Spagni1-31/+10
f98fe46 MDB_VL32 change overflow page scan (Howard Chu)
2016-01-29tx_pool: do not accept txes not in a block if they timed out beforemoneromooo-monero2-2/+14
This is intended to avoid cases where a timed out tx will be re-relayed by another peer for which it has not timed out yet, which would cause the tx to stay in the network's pool for a long time (until all peers time it out before another one tries to relay it again).
2016-01-29tx_pool: fix use of invalidated iteratormoneromooo-monero1-1/+2
2016-01-29Fix V1/V2 use of hard fork related parametersmoneromooo-monero13-45/+89
Some of it uses hardcoded height, which will need some thinking for next (voted upon) fork.
2016-01-28BlockchainBDB: Continue when tx has no outputswarptangent1-3/+5
See 24b66243c2767726ea4b279fcf447c7cd82c13e5
2016-01-28BlockchainBDB: When removing, find amount output index fast by starting at endwarptangent1-10/+33
This improves blockchain reorganization time by allowing one of the more expensive DB lookups when popping a block to not have to seek through a long dup list in the "output_amounts" db. This is most noticeable for HDDs. See ffcf6bdb95abe2dab37d5f8d9acc134fdc6b4d36
2016-01-28BlockchainBDB: Remove tx outputs in reverse orderwarptangent1-4/+14
Data should be removed in the reverse order it was added. This matches the order of removal in blockchain_storage::pop_transaction_from_global_index. See f11def012f38106b0ffeb7010a2f749de1e5b640
2016-01-28MDB_VL32 change overflow page scanHoward Chu1-31/+10
Just check the requested page, don't worry about any other pages
2016-01-28Merge pull request #626Riccardo Spagni1-1/+3
afe2d1a add received time to print_pool and print_pool_sh (Riccardo Spagni)
2016-01-28Merge pull request #625Riccardo Spagni2-6/+7
7e65cc0 MDB_VL32 Fix off-by-one in mdb_midl_shrink (Howard Chu) 222e30e MDB_VL32 Fix another 32bit overflow (Howard Chu) 3ca6e85 Tweak mdb_strerror msg buffer (Howard Chu) 78ad970 MDB_VL32 Fix d2a5f72f73e0e4030b521086b13b8c8efaf9ca9e (Howard Chu) 2aa0b3b updated gtest (added missing files) (Riccardo Spagni) 83d586c updated gtest (Riccardo Spagni) fdc10ff even more typos (Henning Kopp) da5415a more typos fixed (Henning Kopp) a8c6f15 fixed typo (Henning Kopp) 423c7fe simplewallet: remove leftover command line refresh-type handling (moneromooo-monero)
2016-01-28add received time to print_pool and print_pool_shRiccardo Spagni1-1/+3
2016-01-28MDB_VL32 Fix off-by-one in mdb_midl_shrinkHoward Chu1-1/+1
2016-01-27MDB_VL32 Fix another 32bit overflowHoward Chu1-1/+1
2016-01-27Tweak mdb_strerror msg bufferHoward Chu1-3/+4
2016-01-27MDB_VL32 Fix d2a5f72f73e0e4030b521086b13b8c8efaf9ca9eHoward Chu1-1/+1
VirtualAlloc is not for MDB_VL32
2016-01-27updated gtest (added missing files)Riccardo Spagni5-0/+525