aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* update versionRiccardo Spagni2015-12-3112-15/+16
|
* Merge pull request #587Riccardo Spagni2015-12-313-31/+25
|\ | | | | | | 1e07110 Nicer looking exit when blockchain.bin is found (moneromooo-monero)
| * Nicer looking exit when blockchain.bin is foundmoneromooo-monero2015-12-313-31/+25
| | | | | | | | | | Do not print the exception message, and write the important bit in red, since people will only read the last line otherwise.
* | core: do not use the persistent pool state for testsmoneromooo-monero2015-12-312-1/+7
|/ | | | | | Fixes intermittent test failures when the pool contains unexpected transactions that were brought in from the live pool.
* Merge pull request #584Riccardo Spagni2015-12-311-1/+3
|\ | | | | | | 5c67c48 wallet: don't forget to close the file after storing cache (moneromooo-monero)
| * wallet: don't forget to close the file after storing cachemoneromooo-monero2015-12-311-1/+3
| | | | | | | | | | Also add some flags to open, as epee's save_string_to_file does, to truncate file, etc.
* | updated copyright yearRiccardo Spagni2015-12-31201-200/+200
| |
* | fixed copyrights with bad year referencesRiccardo Spagni2015-12-319-9/+9
| |
* | blockchain: kill ioservice on scope end, rather than manuallymoneromooo-monero2015-12-301-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.
* | miner: minor fixes on stopmoneromooo-monero2015-12-301-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.
* | wallet: add a rescan_bc command and rescan_blockchain RPCmoneromooo-monero2015-12-307-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.
* | wallet: protect against exceptions in the block pull threadmoneromooo-monero2015-12-302-14/+30
| | | | | | | | | | This can happen when the daemon exits, which would also cause the wallet to crash via unhandled exception
* | net_peerlist: move a couple functions from public to privatemoneromooo-monero2015-12-301-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.
* no longer need to pass the size to rapidjsonRiccardo Spagni2015-12-301-2/+2
|
* Merge pull request #575Riccardo Spagni2015-12-301-6/+8
|\ | | | | | | 61befc2 wallet: store cache to file without unnecessary memory buffer (moneromooo-monero)
| * wallet: store cache to file without unnecessary memory buffermoneromooo-monero2015-12-291-6/+8
| |
* | Merge pull request #574Riccardo Spagni2015-12-302-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)
| * | wallet_rpc_server: exit async, so we reply to stop_wallet RPCmoneromooo-monero2015-12-282-1/+11
| | | | | | | | | | | | Reported by saddam
| * | wallet: do not return error if incoming_transfers finds nonemoneromooo-monero2015-12-281-5/+0
| | | | | | | | | | | | reported by saddam
* | | Merge pull request #573Riccardo Spagni2015-12-301-0/+22
|\ \ \ | | | | | | | | | | | | 0953355 blockchain_db: inform user about new format if blockchain.bin is found (moneromooo-monero)
| * | | blockchain_db: inform user about new format if blockchain.bin is foundmoneromooo-monero2015-12-281-0/+22
| |/ /
* | | Merge pull request #572Riccardo Spagni2015-12-302-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)
| * | | Tweak 45800a25e9374e63caaabba05c89585c86acd668hyc2015-12-291-5/+5
| | | | | | | | | | | | | | | | trivial cleanup
| * | | blockchain: always stop the ioservice before returningmoneromooo-monero2015-12-281-0/+2
| | | | | | | | | | | | | | | | Fixes a use after free
| * | | db_lmdb: safety close db at exitmoneromooo-monero2015-12-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Noticed by hyc Also set m_open to false when closed
| * | | db_lmdb: fix a strdup/delete[] mistmatchmoneromooo-monero2015-12-281-3/+6
| |/ /
* | | Merge pull request #570Riccardo Spagni2015-12-301-1/+1
|\ \ \ | | | | | | | | | | | | fc34132 Remove assert from status command (hyc)
| * | | Remove assert from status commandhyc2015-12-271-1/+1
| |/ / | | | | | | | | | Crashes every time...
* | | Merge pull request #569Riccardo Spagni2015-12-306-0/+32
|\ \ \ | | | | | | | | | | | | ee9d71e BlockchainDB: skip fixup check if read-only database (warptangent)
| * | | BlockchainDB: skip fixup check if read-only databasewarptangent2015-12-266-0/+32
| |/ /
* | | Merge pull request #568Riccardo Spagni2015-12-302-9/+2
|\ \ \ | |_|/ |/| | | | | | | | b0541a5 blockchain: remove obsolete containers (moneromooo-monero) 18a5211 blockchain: Fix height in call to on_blockchain_dec (moneromooo-monero)
| * | blockchain: remove obsolete containersmoneromooo-monero2015-12-262-8/+1
| | |
| * | blockchain: Fix height in call to on_blockchain_decmoneromooo-monero2015-12-261-1/+1
| |/ | | | | | | It was a noop anyway
* / hardfork: ensure current_fork_index can not become negative on rescanmoneromooo-monero2015-12-261-1/+1
|/
* Merge pull request #565Riccardo Spagni2015-12-265-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)
| * blockchain: fix a few block addition bugsmoneromooo-monero2015-12-252-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.
| * blockchain: fix an off by one error in unlocked time checkmoneromooo-monero2015-12-251-1/+1
| |
| * blockchain: reinstate double spending checks in check_tx_inputsmoneromooo-monero2015-12-251-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.
| * blockchain: make some flag twiddling code closer to the originalmoneromooo-monero2015-12-251-2/+2
| | | | | | | | Probably paranoid and unnecessary
| * blockchain: fix bitflipping test with quantized block rewardsmoneromooo-monero2015-12-253-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.
| * blockchain: add missing m_tx_pool.on_blockchain_decmoneromooo-monero2015-12-251-0/+1
| | | | | | | | | | It was missing in the port to DB. This is actually a noop, so should not have functional changes.
| * blockchain: fix switch to alternative blockchain for more than one blockmoneromooo-monero2015-12-251-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.
| * blockchain: add a missing validity check to rollback_blockchain_switchingmoneromooo-monero2015-12-251-0/+6
| | | | | | | | It was present in the original code
| * core: catch exceptions from get_output_keymoneromooo-monero2015-12-251-2/+18
| | | | | | | | | | This can happen when trying to find an amount that does not exist, and fixes a core test.
| * db: throw when given a non txout_to_key output to addmoneromooo-monero2015-12-253-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.
* | Merge pull request #562Riccardo Spagni2015-12-251-3/+5
|\ \ | | | | | | | | | d4c2fae BlockchainDB: Remove txs in reverse order (warptangent)
| * | BlockchainDB: Remove txs in reverse orderwarptangent2015-12-241-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.
* | | Merge pull request #561Riccardo Spagni2015-12-251-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)
| * | BlockchainLMDB: When removing, find amount output index fast by starting at endwarptangent2015-12-241-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.
| * | BlockchainLMDB: Remove tx outputs in reverse orderwarptangent2015-12-241-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.