summaryrefslogtreecommitdiff
path: root/src/cryptonote_core
Commit message (Collapse)AuthorAgeFilesLines
* added checkpointsRiccardo Spagni2016-01-151-0/+8
|
* hardfork: fix accepting v2 blocks too earlymoneromooo-monero2016-01-151-2/+1
|
* Merge pull request #587Riccardo Spagni2015-12-311-28/+20
|\ | | | | | | 1e07110 Nicer looking exit when blockchain.bin is found (moneromooo-monero)
| * Nicer looking exit when blockchain.bin is foundmoneromooo-monero2015-12-311-28/+20
| | | | | | | | | | 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.
* updated copyright yearRiccardo Spagni2015-12-3131-31/+31
|
* fixed copyrights with bad year referencesRiccardo Spagni2015-12-312-2/+2
|
* 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.
* 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-301-0/+2
|\ \ | | | | | | | | | | | | | | | | | | 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)
| * | blockchain: always stop the ioservice before returningmoneromooo-monero2015-12-281-0/+2
| |/ | | | | | | Fixes a use after free
* | 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 #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
|/
* 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-251-0/+5
| | | | | | 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.
* Allow the wallet to access hard fork informationmoneromooo-monero2015-12-194-5/+21
| | | | And make it change behavior slightly when close/after first hard fork
* Add missing semicolons after log statementsmoneromooo-monero2015-12-192-4/+4
|
* replace std::auto_ptr with std::unique_ptrmoneromooo-monero2015-12-171-1/+1
| | | | The former is obsolete
* Fix typowarptangent2015-12-152-2/+2
|
* blockchain.cpp: Change indentation from 4 to 2 spaceswarptangent2015-12-151-2193/+2191
|
* Replace tabs with two spaces for consistency with rest of codebasewarptangent2015-12-1512-315/+314
| | | | Remove trailing whitespace in same files.
* Merge pull request #537Riccardo Spagni2015-12-151-0/+1
|\ | | | | | | a74cc1b hardfork: only accept major versions we know about (moneromooo-monero)
| * hardfork: only accept major versions we know aboutmoneromooo-monero2015-12-141-0/+1
| |
* | Tone down a bit L0 logs during daemon syncmoneromooo-monero2015-12-141-1/+1
|/
* add a --fakechain argument for testsmoneromooo-monero2015-12-134-8/+17
| | | | | | | | | | | 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.
* blockchain: log block (not chain) height in "BLOCK SUCCESFULLY ADDED"moneromooo-monero2015-12-131-1/+1
| | | | | This makes it log the same height as the original code, which is less confusing when comparing behaviors.
* blockchain: fix off by one in get_blocksmoneromooo-monero2015-12-131-1/+1
|
* tx_pool: fix "minumim" typo in messagemoneromooo-monero2015-12-131-1/+1
|
* Merge pull request #527Riccardo Spagni2015-12-091-10/+23
|\ | | | | | | 336b375 Register daemon command line arguments to core if they're used in core (moneromooo-monero)
| * Register daemon command line arguments to core if they're used in coremoneromooo-monero2015-12-081-10/+23
| | | | | | | | | | | | 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.
* | blockchain_db: fixup missing key images in early DB versionmoneromooo-monero2015-12-061-0/+3
|/ | | | | | | | | | | Early DB versions did not store key images for inputs if the transaction spending them had no outputs (ie, all fee). This is not correct, as this would allow these outputs to be double spent. This was fixed in 533acc30eda7792c802ea8b6417917fa99b8bc2b a few months ago, but databases having synced blocks 2021612 and 685498 with a faulty version will be missing those key images in the spent keys database. This code checks for this, and adds those key images if they are missing.
* Revert "Merge pull request #506"Riccardo Spagni2015-11-301-2/+2
| | | | | This reverts commit c6bf73131aaf804cb17f24c856f826be2761a566, reversing changes made to 8a52cf4055d247dd4b162985c931e99683992e3c.
* core: serialize block major/minor versions as bytes, not varintsmoneromooo-monero2015-11-271-2/+2
| | | | | | | | This allows them to be saved as a fixed (one byte) chunk whatever the value. Using a varint will use two bytes as the high bit gets set. This is backward compatible with current usage (0-2 values).
* Merge pull request #501Riccardo Spagni2015-11-243-27/+34
|\ | | | | | | | | | | | | | | | | d887c18 hardfork: fix more major/minor issues (moneromooo-monero) 3b47ca2 hardfork: fix rescan on load (moneromooo-monero) 4cea2b1 Add IP blocking for misbehaving nodes (adapted from Boolberry) (Javier Smooth) 9c64b12 quiet down p2p logging a bit (Javier Smooth) 53c75ab blockchain: log versions as numbers, not characters (moneromooo-monero) edade8d hardfork: fix actual/voting confusion (moneromooo-monero)
| * hardfork: fix more major/minor issuesmoneromooo-monero2015-11-243-24/+26
| | | | | | | | | | | | | | | | | | | | | | Also add some more tests, and rename some instances of "version" and "add" for clarity. NOTE: the starting height values are sometimes wrong. I suspect this is due to the hard fork reorg code being buggy, since they're good when syncing after the fact. However, they're not actually used by the consensus code, so I'm ignoring this for now, but this needs debugging.
| * hardfork: fix rescan on loadmoneromooo-monero2015-11-231-1/+1
| |