summaryrefslogtreecommitdiff
path: root/tests/unit_tests
Commit message (Collapse)AuthorAgeFilesLines
* tests: add test for needed OpenSSL algorithms in unboundmoneromooo-monero2016-03-292-1/+52
| | | | | These can be compiled out of libunbound, leading to failure to check DNSSEC validity.
* tests: obligatory hardfork unit build fix after interface changemoneromooo-monero2016-03-261-1/+1
|
* New RPC and daemon command to get output histogrammoneromooo-monero2016-03-261-0/+1
| | | | | | | | | | | | | | | | | This is a list of existing output amounts along with the number of outputs of that amount in the blockchain. The daemon command takes: - no parameters: all outputs with at least 3 instances - one parameter: all outputs with at least that many instances - two parameters: all outputs within that many instances The default starts at 3 to avoid massive spamming of all dust outputs in the blockchain, and is the current minimum mixin requirement. An optional vector of amounts may be passed, to request histogram only for those outputs.
* Revert "Print stack trace upon exceptions"moneromooo-monero2016-03-214-4/+2
| | | | | | Ain't nobody got time for link/cmake skullduggery. This reverts commit fff238ec94ac6d45fc18c315d7bc590ddfaad63d.
* Print stack trace upon exceptionsmoneromooo-monero2016-03-194-2/+4
| | | | Useful for debugging users' logs
* unit_tests: fix hard fork unit test compilationwarptangent2016-03-051-1/+1
| | | | Match changed BlockchainDB function declaration.
* Merge pull request #689Riccardo Spagni2016-02-291-1/+1
|\ | | | | | | 5ab33ca unit_tests: update test openalias address (moneromooo-monero)
| * unit_tests: update test openalias addressmoneromooo-monero2016-02-231-1/+1
| | | | | | | | It was recently changed
* | move g_test_dbg_lock_sleep from a global to a function level staticmoneromooo-monero2016-02-221-2/+0
|/ | | | | This avoids the need to define that variable in every program which uses epee.
* unit_tests: fix blockchain unit test after hard fork import fixmoneromooo-monero2016-02-081-1/+10
|
* unit_tests: fix hard fork unit test compilationmoneromooo-monero2016-02-081-0/+4
|
* Merge pull request #641Riccardo Spagni2016-02-081-13/+9
|\ | | | | | | | | | | | | 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)
| * unit_tests: fix mnemonics unit test testing invalid seedsmoneromooo-monero2016-02-011-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.
* | unit_tests: fix hard fork unit tests and add a test for major toomoneromooo-monero2016-02-011-30/+68
|/
* OpenBSD support for Monero.me0wmix2016-01-211-2/+2
|
* Fix 30f92f5630bbc7507708275a29a9ae7acf633a5bHoward Chu2016-01-161-0/+1
| | | | Needed to add the corresponding (dummy) method to unit test hardfork
* unit_tests: initialize db object in ctor, not openmoneromooo-monero2016-01-021-1/+2
| | | | open isn't actually called in those tests
* updated copyright yearRiccardo Spagni2015-12-3125-25/+25
|
* unit_tests: remove an unused variablemoneromooo-monero2015-12-301-1/+0
|
* unit_tests: fix hardfork test buildmoneromooo-monero2015-12-301-0/+1
| | | | | The dummy blockchain class needed to have the newly added is_read_only virtual function.
* tests: add a unit test for canonical decomposed amountsmoneromooo-monero2015-12-262-0/+84
|
* unit_tests: fix hard fork testsmoneromooo-monero2015-12-241-1/+2
| | | | | A couple stopped passing when the hard fork code was made to reject incoming hard fork versions it did not know about.
* unit_tests: new test for IP blockingmoneromooo-monero2015-12-242-0/+169
|
* unit_tests: fix block reward test using post hard fork settingsmoneromooo-monero2015-12-131-15/+15
| | | | | This would fail, as the post hard fork settings would yield different data, and the test expects pre hard fork data.
* tests: fix a typo in test namemoneromooo-monero2015-12-131-1/+1
|
* blockchain_db: make the indexing base a BlockchainDB virtual functionmoneromooo-monero2015-12-051-0/+1
|
* hardfork: fix more major/minor issuesmoneromooo-monero2015-11-241-44/+57
| | | | | | | | | | | 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.
* Adjust difficulty target (2 min) and full reward zone (60 kbytes) for block ↵Javier Smooth2015-11-131-7/+7
| | | | version 2
* hardfork: add a get_ideal_version(uint64_t) functionmoneromooo-monero2015-11-101-0/+22
| | | | | It returns the ideal version for a given height, which is based on the minimum height for a fork, disregarding votes
* hardfork: allow per-fork voting thresholdsmoneromooo-monero2015-11-081-0/+28
| | | | And setup the first fork to not vote
* unit_tests: fix build without berkeleydbmoneromooo-monero2015-11-031-1/+7
|
* Remove some old/obsolete/unused codemoneromooo-monero2015-10-271-1/+0
| | | | git history's here if needed to get any of this back
* Build fixes for the old blockchain_storage versionmoneromooo-monero2015-10-261-0/+5
|
* hardfork: switch voting to block minor versionmoneromooo-monero2015-10-211-4/+1
| | | | | | | | | | | | Using major version would cause older daemons to reject those blocks as they fail to deserialize blocks with a major version which is not 1. There is no such restriction on the minor version, so switching allows older daemons to coexist with newer ones till the actual fork date, when most will hopefully have updated already. Also, for the same reason, we consider a vote for 0 to be a vote for 1, since older daemons set minor version to 0.
* unit_tests: remove leftover debug traces in hardfork testmoneromooo-monero2015-10-211-2/+0
|
* hardfork: rescan speedupmoneromooo-monero2015-09-271-8/+8
| | | | | Add a block height before which version 1 is assumed Use DB transactions
* hardfork: change window semantics to not count the newly added blockmoneromooo-monero2015-09-271-10/+13
| | | | | | | | | This allows knowing the hard fork a block must obey in order to be added to the blockchain. The previous semantics would use that new block's version vote to determine this hard fork, which made it impossible to use the rules to validate transactions entering the tx pool (and made it impossible to validate a block before adding it to the blockchain).
* hardfork: most state now saved to the DBmoneromooo-monero2015-09-201-142/+200
| | | | | There will be a delay on first load of an existing blockchain as it gets reparsed for this state data.
* New hardfork classmoneromooo-monero2015-09-122-1/+396
| | | | | This keeps track of voting via block version, in order to decide when to enable a particular fork's code.
* dns: make ctor privatemoneromooo-monero2015-08-271-6/+6
| | | | | | | This ensures one can't instanciate a DNSResolver object by mistake, but uses the singleton. A separate create static function is added for cases where a new object is explicitely needed.
* Fix block_reward unit testsRostislav2015-07-261-10/+10
|
* Set dnssec_valid value correctly in dns_utils; fix address_from_url testRostislav2015-06-201-1/+2
|
* cleaning up, removing redundant files, renaming, fixing incorrect licensesRiccardo Spagni2015-05-312-2/+2
|
* Allow name@domain.tld for OpenAlias lookupswarptangent2015-05-192-0/+16
| | | | | | | | | | | | | | | | | | Based on tewinget's update. Make OpenAlias address format independent of existing DNS functions. Add tests. Test: make debug-test cd build/debug/tests/unit_tests # test that regular DNS functions work, including IPv4 lookups. # also test function that converts OpenAlias address format make && ./unit_tests --gtest_filter=DNSResolver* # test that OpenAlias addresses like donate@getmonero.org work from # wallet tools make && ./unit_tests --gtest_filter=AddressFromURL.Success
* [fix] log level change. compilation: dns, testsrfree2monero2015-04-101-1/+1
| | | | | old unbound #warning does not block compilation unit tests build fine. Even though the RPC/P2P network type is required again
* Merge BlockchainDB into upstreamThomas Winget2015-04-072-0/+327
|\
| * Merge upstream into blockchainThomas Winget2015-03-291-2/+34
| |\
| * \ update berkeleydb branch to blockchain branchThomas Winget2015-03-252-3/+3
| |\ \
| | * \ Merge upstream updates into blockchain branchThomas Winget2015-03-252-3/+3
| | |\ \
| * | | | BerkeleyDB Blockchain building, not working yetThomas Winget2015-03-161-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Everything except actually *using* BlockchainBDB is wired up, but the db itself is not yet working. Some error about user mem not large enough. I think I know what this error means, but I can't determine the cause. Notes: BerkeleyDB does not allow 0-indexing in its recno type databases, so block numbers *in the database* will be 1-indexed. Modifications to indexing have been made as needed.