aboutsummaryrefslogtreecommitdiff
path: root/src (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-02-18std::condvar is broken on Win32 with gcc/g++ 4.8 tooHoward Chu1-2/+2
Use boost...
2016-02-18Use boost::thread instead of std::threadHoward Chu3-3/+4
std::thread crashes on (at least) ARMv6 g++ 4.8/4.9
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-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-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-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-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-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 Spagni1-9/+0
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-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: 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-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-monero6-18/+26
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-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-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-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 Spagni3-58/+89
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-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-01hardfork: allow passing chain height in get(height) for conveniencemoneromooo-monero1-1/+4
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 Spagni4-34/+45
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-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-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-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-28add received time to print_pool and print_pool_shRiccardo Spagni1-1/+3
2016-01-25Merge pull request #622Riccardo Spagni2-6/+6
e514f0a even more typos (Henning Kopp) 9abc4b8 more typos fixed (Henning Kopp) 0693f3c fixed typo (Henning Kopp)
2016-01-25Merge pull request #621Riccardo Spagni2-5/+0
f76f656 simplewallet: remove leftover command line refresh-type handling (moneromooo-monero)
2016-01-25Merge pull request #620Riccardo Spagni1-1/+1
15d9ac8 wallet2: update spent comparison now that we have two spent states (moneromooo-monero)
2016-01-25even more typosHenning Kopp1-2/+2
2016-01-25more typos fixedHenning Kopp2-3/+3
2016-01-25fixed typoHenning Kopp1-1/+1
2016-01-25simplewallet: remove leftover command line refresh-type handlingmoneromooo-monero2-5/+0
2016-01-24wallet2: update spent comparison now that we have two spent statesmoneromooo-monero1-1/+1
2016-01-21OpenBSD support for Monero.me0wmix6-10/+14
2016-01-19db_lmdb: Continue when tx has no outputswarptangent1-4/+6
2016-01-15Fix hf when import with verify offHoward Chu6-0/+30
Delete the hf tables, so the next open will rescan and regenerate
2016-01-15added checkpointsRiccardo Spagni1-0/+8
2016-01-15bumped version to 0.9.1 for point releaseRiccardo Spagni1-1/+1
2016-01-15Merge pull request #610Riccardo Spagni1-2/+1
945ac78 hardfork: fix accepting v2 blocks too early (moneromooo-monero)
2016-01-15hardfork: fix accepting v2 blocks too earlymoneromooo-monero1-2/+1
2016-01-14'max limit of...' is redundant wording, rephrasebinaryFate3-3/+3
2016-01-14Print msg when successfully updating out_peersbinaryFate1-0/+2
2016-01-12Merge pull request #606Riccardo Spagni1-24/+64
8ce12a9 Fix arm asm (Howard Chu) 94de39f Tweak arm6 flags (Howard Chu)
2016-01-12Merge pull request #603Riccardo Spagni1-0/+25
c5baf30 use load_file_to_string and exit with error on file read errors (Fabian Hirschmann) 7b2d27f remove new lines at the end of the password only (Fabian Hirschmann) 302cc9c add --password-file option (Fabian Hirschmann)
2016-01-11Fix arm asmHoward Chu1-24/+64
About 10% faster than plain C mul128 on raspi1B
2016-01-11rpc: fix missing target information in RPC callmoneromooo-monero2-0/+3
which fixes the status command via RPC too. Turns out there are two versions of the GET_INFO call. I'd never noticed before.
2016-01-11daemon: fix status command when run from command linemoneromooo-monero1-1/+1
2016-01-10wallet2: decide at runtime which upper tx size to usemoneromooo-monero2-6/+20
The value will be different depending on whether we've reached the first hard fork, which allows a larger size, or not. This fixes transactions being rejected by the daemon on mainnet where the first hard fork is not yet active.
2016-01-09use load_file_to_string and exit with error on file read errorsFabian Hirschmann1-3/+9
2016-01-09remove new lines at the end of the password onlyFabian Hirschmann1-2/+2
2016-01-09add --password-file optionFabian Hirschmann1-0/+19
2016-01-05rpc: is_key_image_spent now checks the tx pool toomoneromooo-monero3-4/+40
2016-01-03fixed conflictsRiccardo Spagni2-4/+4
2016-01-03Use CMAKE_LINKER, not hardcoded "ld"Howard Chu2-4/+4
2016-01-02daemon: fix ban length using wrong parametermoneromooo-monero1-1/+1
2015-12-31update versionRiccardo Spagni12-15/+16
2015-12-31Merge pull request #587Riccardo Spagni3-31/+25
1e07110 Nicer looking exit when blockchain.bin is found (moneromooo-monero)
2015-12-31Nicer looking exit when blockchain.bin is foundmoneromooo-monero3-31/+25
Do not print the exception message, and write the important bit in red, since people will only read the last line otherwise.
2015-12-31core: do not use the persistent pool state for testsmoneromooo-monero2-1/+7
Fixes intermittent test failures when the pool contains unexpected transactions that were brought in from the live pool.
2015-12-31Merge pull request #584Riccardo Spagni1-1/+3
5c67c48 wallet: don't forget to close the file after storing cache (moneromooo-monero)
2015-12-31wallet: don't forget to close the file after storing cachemoneromooo-monero1-1/+3
Also add some flags to open, as epee's save_string_to_file does, to truncate file, etc.
2015-12-31updated copyright yearRiccardo Spagni201-200/+200
2015-12-31fixed copyrights with bad year referencesRiccardo Spagni9-9/+9
2015-12-30blockchain: kill ioservice on scope end, rather than manuallymoneromooo-monero1-6/+7
This ensures this will be done without fail, as the error prone matching of every return with a call to KILL_IOSERVICE leads to hard to debug corruption when one is missing.
2015-12-30miner: minor fixes on stopmoneromooo-monero1-1/+4
- only try to stop if actually started - print number of threads before zeroing it This fixes the suspiciously doubled "Mining has been stopped" message on exit.
2015-12-30wallet: add a rescan_bc command and rescan_blockchain RPCmoneromooo-monero7-13/+84
Blockchain hashes and key images are flushed, and blocks are pulled anew from the daemon. The console command is shortened to match bc_height. This should make it a lot easier on users who are currently told to remove this particular cache file but keep the keys one, etc, etc.
2015-12-30wallet: protect against exceptions in the block pull threadmoneromooo-monero2-14/+30
This can happen when the daemon exits, which would also cause the wallet to crash via unhandled exception
2015-12-30net_peerlist: move a couple functions from public to privatemoneromooo-monero1-2/+2
They do not take the object lock, and are meant to be used only internally, called from a function which does take the lock.
2015-12-30no longer need to pass the size to rapidjsonRiccardo Spagni1-2/+2
2015-12-30Merge pull request #575Riccardo Spagni1-6/+8
61befc2 wallet: store cache to file without unnecessary memory buffer (moneromooo-monero)
2015-12-30Merge pull request #574Riccardo Spagni2-6/+11
61ce8d6 wallet_rpc_server: exit async, so we reply to stop_wallet RPC (moneromooo-monero) 9847db6 wallet: do not return error if incoming_transfers finds none (moneromooo-monero)
2015-12-30Merge pull request #573Riccardo Spagni1-0/+22
0953355 blockchain_db: inform user about new format if blockchain.bin is found (moneromooo-monero)
2015-12-30Merge pull request #572Riccardo Spagni2-3/+11
b39aae7 Tweak 45800a25e9374e63caaabba05c89585c86acd668 (hyc) 4a5a5ff blockchain: always stop the ioservice before returning (moneromooo-monero) 78b65cf db_lmdb: safety close db at exit (moneromooo-monero) 45800a2 db_lmdb: fix a strdup/delete[] mistmatch (moneromooo-monero)
2015-12-30Merge pull request #570Riccardo Spagni1-1/+1
fc34132 Remove assert from status command (hyc)
2015-12-30Merge pull request #569Riccardo Spagni6-0/+32
ee9d71e BlockchainDB: skip fixup check if read-only database (warptangent)
2015-12-30Merge pull request #568Riccardo Spagni2-9/+2
b0541a5 blockchain: remove obsolete containers (moneromooo-monero) 18a5211 blockchain: Fix height in call to on_blockchain_dec (moneromooo-monero)
2015-12-29wallet: store cache to file without unnecessary memory buffermoneromooo-monero1-6/+8
2015-12-29Tweak 45800a25e9374e63caaabba05c89585c86acd668hyc1-5/+5
trivial cleanup
2015-12-28wallet_rpc_server: exit async, so we reply to stop_wallet RPCmoneromooo-monero2-1/+11
Reported by saddam
2015-12-28blockchain_db: inform user about new format if blockchain.bin is foundmoneromooo-monero1-0/+22
2015-12-28blockchain: always stop the ioservice before returningmoneromooo-monero1-0/+2
Fixes a use after free
2015-12-28wallet: do not return error if incoming_transfers finds nonemoneromooo-monero1-5/+0
reported by saddam
2015-12-28db_lmdb: safety close db at exitmoneromooo-monero1-0/+3
Noticed by hyc Also set m_open to false when closed
2015-12-28db_lmdb: fix a strdup/delete[] mistmatchmoneromooo-monero1-3/+6
2015-12-27Remove assert from status commandhyc1-1/+1
Crashes every time...
2015-12-26BlockchainDB: skip fixup check if read-only databasewarptangent6-0/+32
2015-12-26blockchain: remove obsolete containersmoneromooo-monero2-8/+1
2015-12-26blockchain: Fix height in call to on_blockchain_decmoneromooo-monero1-1/+1
It was a noop anyway
2015-12-26hardfork: ensure current_fork_index can not become negative on rescanmoneromooo-monero1-1/+1
2015-12-26Merge pull request #565Riccardo Spagni5-45/+101
79beed2 tests: fix various tests by using parameters better suited to monero (moneromooo-monero) d0a8362 tests: fix some double spending tests (moneromooo-monero) 2358d0d tests: use 255 as a "too high" block version (moneromooo-monero) f33a88c blockchain: fix a few block addition bugs (moneromooo-monero) a9ff11c blockchain: fix an off by one error in unlocked time check (moneromooo-monero) f294be3 blockchain: reinstate double spending checks in check_tx_inputs (moneromooo-monero) 737b6d6 blockchain: make some flag twiddling code closer to the original (moneromooo-monero) 81cb0fc blockchain: fix bitflipping test with quantized block rewards (moneromooo-monero) 22ddf09 blockchain: add missing m_tx_pool.on_blockchain_dec (moneromooo-monero) d837c0c blockchain: fix switch to alternative blockchain for more than one block (moneromooo-monero) 5cec076 blockchain: add a missing validity check to rollback_blockchain_switching (moneromooo-monero) 3cabdb5 core: catch exceptions from get_output_key (moneromooo-monero) 5eef645 db: throw when given a non txout_to_key output to add (moneromooo-monero)
2015-12-25blockchain: fix a few block addition bugsmoneromooo-monero2-34/+46
If the block reward was too high, the verification failed flag was set, but the function continued. The code which was supposed to trap this flag and return failure failed to trap it, and, while the block was not added to the chain, the function would return success. The reason for avoiding returning when the block reward problem was detected was to be able to return any transactions to the pool if needed. This is now mooted by moving the transaction return code to a separate function, which is now called at all appropriate points, making the logic much simpler, and hopefully correct now. We also move the hard fork version check after the prev_id check, as block which does not go on the top of the chain might not have the expected version there, without being invalid just for this reason. Last, we trap the case where a block fails to be added due to using already spent key images, to set the verification failed flag.
2015-12-25blockchain: fix an off by one error in unlocked time checkmoneromooo-monero1-1/+1
2015-12-25blockchain: reinstate double spending checks in check_tx_inputsmoneromooo-monero1-3/+7
This fixes some double spending tests. This may or may not be unneeded in normal (non test) circumstances, to be determined later. Keeping these for now may be slower, but safer.
2015-12-25blockchain: make some flag twiddling code closer to the originalmoneromooo-monero1-2/+2
Probably paranoid and unnecessary
2015-12-25blockchain: fix bitflipping test with quantized block rewardsmoneromooo-monero3-2/+6
Block reward may now be less than the full amount allowed. This was breaking the bitflipping test. We now keep track of whether a block which was accepted by the core has a lower than allowed block reward, and allow this in the test.
2015-12-25blockchain: add missing m_tx_pool.on_blockchain_decmoneromooo-monero1-0/+1
It was missing in the port to DB. This is actually a noop, so should not have functional changes.
2015-12-25blockchain: fix switch to alternative blockchain for more than one blockmoneromooo-monero1-1/+1
When rolling over more than one block, the db height will decrease, but the split height should be constant, as per the original code.
2015-12-25blockchain: add a missing validity check to rollback_blockchain_switchingmoneromooo-monero1-0/+6
It was present in the original code
2015-12-25core: catch exceptions from get_output_keymoneromooo-monero1-2/+18
This can happen when trying to find an amount that does not exist, and fixes a core test.
2015-12-25db: throw when given a non txout_to_key output to addmoneromooo-monero3-0/+13
The check was explicit in the original version, so it seems safer to make it explicit here, especially as it is now done implicitely in a different place, away from the original check.
2015-12-25Merge pull request #562Riccardo Spagni1-3/+5
d4c2fae BlockchainDB: Remove txs in reverse order (warptangent)
2015-12-25Merge pull request #561Riccardo Spagni1-9/+10
ffcf6bd BlockchainLMDB: When removing, find amount output index fast by starting at end (warptangent) f11def0 BlockchainLMDB: Remove tx outputs in reverse order (warptangent)
2015-12-25Merge pull request #557Riccardo Spagni3-1/+35
791e7fb changed height to uint64_t (Brendan Telzrow) 4cd7913 added RPC wallet command getheight (Brendan Telzrow)
2015-12-24BlockchainDB: Remove txs in reverse orderwarptangent1-3/+5
Data should be removed in the reverse order it was added. Not doing so breaks assumptions and can cause problems in other DB implementations. This matches the order of tx removal in blockchain_storage::purge_block_data_from_blockchain.
2015-12-24BlockchainLMDB: When removing, find amount output index fast by starting at endwarptangent1-4/+5
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" subdb. This is most noticeable for HDDs. As before, the dup list is still walked if necessary (but in reverse), and the global output index still confirmed to be the one looked for. But under proper use, the result will be found at the end of the dup list, so we start there. Removing an amount output index is always done in the context of popping a block, so the global output index being looked for should be the last one in that amount key's dup list. Even if the txs themselves aren't removed in reverse order (supposed to be according to original implementation), the specified amount output index will still be near the end, because the txs are in the same block. TEST: Pop blocks with blockchain_import. Blocks should be successfully removed with no errors shown. bitmonerod should be able to start syncing from the reduced blockchain height.
2015-12-24BlockchainLMDB: Remove tx outputs in reverse orderwarptangent1-5/+5
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.
2015-12-24fixed missing parenthesisRiccardo Spagni1-1/+1
2015-12-24fix for 'failed to generate new wallet: failed to save file' error during ↵Lex Kalinkin1-3/+5
wallet generation
2015-12-23changed height to uint64_tBrendan Telzrow1-4/+4
2015-12-23added RPC wallet command getheightBrendan Telzrow3-1/+35
2015-12-22net_node: fix a hang on exitmoneromooo-monero1-1/+1
One loop was not paying attention to the stop signal, and could end up looping forever
2015-12-22Merge pull request #552Riccardo Spagni8-24/+4
9428d53 Strip redundant includes (hyc)
2015-12-22Merge pull request #550Riccardo Spagni1-2/+5
8c93608 wallet: fix load/save versioning bug for recently added tx data (moneromooo-monero)
2015-12-22Merge pull request #547Riccardo Spagni15-20/+75
8ea7af1 Allow the wallet to access hard fork information (moneromooo-monero) 760331b epee: make log macros behave like statements (moneromooo-monero) 3f2970f Add missing semicolons after log statements (moneromooo-monero)
2015-12-22Merge pull request #545Riccardo Spagni3-1/+11
0ab56b8 print top block hash in daemon diff command (moneromooo-monero)
2015-12-21Strip redundant includeshyc8-24/+4
In particular, <boost/program_options.hpp> blows up daemon.cpp.obj, making it too big to compile in debug mode on Win32. Even on a release build it drops daemon.cpp.o on Linux from 31MB to 20MB. This has no effect on the final linked binary size.
2015-12-20wallet: fix load/save versioning bug for recently added tx datamoneromooo-monero1-2/+5
The version number passed to those data's serialize function was always 0, not the wallet's version as I had expected. A version number now exists for these structures so they're versioned correctly.
2015-12-19Allow the wallet to access hard fork informationmoneromooo-monero8-8/+63
And make it change behavior slightly when close/after first hard fork
2015-12-19Add missing semicolons after log statementsmoneromooo-monero8-12/+12
2015-12-18print top block hash in daemon diff commandmoneromooo-monero3-1/+11
and add top block hash in get_info RPC
2015-12-18Merge pull request #544Riccardo Spagni2-3/+3
01e92eb replace std::auto_ptr with std::unique_ptr (moneromooo-monero)
2015-12-18Merge pull request #543Riccardo Spagni2-2/+2
63cb1a5 move another non user useful log to L1 (moneromooo-monero) 02827d5 p2p: minor log formatting fix (moneromooo-monero)
2015-12-18Merge pull request #542Riccardo Spagni2-1/+20
9b4f8b4 wallet: save to a temporary file, then rename (moneromooo-monero)
2015-12-17replace std::auto_ptr with std::unique_ptrmoneromooo-monero2-3/+3
The former is obsolete
2015-12-17move another non user useful log to L1moneromooo-monero1-1/+1
2015-12-17p2p: minor log formatting fixmoneromooo-monero1-1/+1