aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-07-13remove hf_starting_height dbmoneromooo-monero1-31/+1
It's not really needed, it used to be an optimization for when that code was not using the db and needed to recalculate things fast on startup.
2016-05-18fix: error: -Werror=misleading-indentationmoneroexample1-1/+3
Compilation of bitmonero on Arch with gcc 6.1 results in the following error: /home/mwo/bitmonero/tests/unit_tests/hardfork.cpp: In member function ‘virtual void TestDB::set_hard_fork_version(uint64_t, uint8_t)’: /home/mwo/bitmonero/tests/unit_tests/hardfork.cpp:132:5: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation] if (versions.size() <= height) versions.resize(height+1); versions[height] = version; This can be fixed by simply unfolding this line into three lines.
2016-05-17Merge pull request #831Riccardo Spagni2-2/+69
9ef8c7b tests: fix tests broken by the removal of the block reward accumulation loop (moneromooo-monero) a6e717e cn_deserialize: deserialize tx_extra too (moneromooo-monero) 3eff37f unit_tests: add a write_varint/read_varint test (moneromooo-monero) 7a66387 unit_tests: fix UNBOUND_LIBRARIES/UNBOUND_LIBRARY typo (moneromooo-monero) d6bce4b core: move tx_extra parsing errors to log level 1 (moneromooo-monero)
2016-05-01unit_tests: add a write_varint/read_varint testmoneromooo-monero2-1/+68
2016-05-01unit_tests: fix UNBOUND_LIBRARIES/UNBOUND_LIBRARY typomoneromooo-monero1-1/+1
2016-04-29Merge branch 'performance' of https://github.com/LMDB/bitmoneroRiccardo Spagni1-4/+5
2016-04-05Merge branch 'performance' into masterHoward Chu1-4/+5
2016-04-05CleanupHoward Chu1-4/+5
drop obsolete remove_output() fix get_output_key(global), fix crash in blockchain_dump
2016-04-02tests: unbound API is only accessible in static buildsmoneromooo-monero1-0/+4
2016-03-29tests: add test for needed OpenSSL algorithms in unboundmoneromooo-monero2-1/+52
These can be compiled out of libunbound, leading to failure to check DNSSEC validity.
2016-03-26tests: obligatory hardfork unit build fix after interface changemoneromooo-monero1-1/+1
2016-03-26New RPC and daemon command to get output histogrammoneromooo-monero1-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.
2016-03-21Revert "Print stack trace upon exceptions"moneromooo-monero4-4/+2
Ain't nobody got time for link/cmake skullduggery. This reverts commit fff238ec94ac6d45fc18c315d7bc590ddfaad63d.
2016-03-19Print stack trace upon exceptionsmoneromooo-monero4-2/+4
Useful for debugging users' logs
2016-03-05unit_tests: fix hard fork unit test compilationwarptangent1-1/+1
Match changed BlockchainDB function declaration.
2016-02-29Merge pull request #689Riccardo Spagni1-1/+1
5ab33ca unit_tests: update test openalias address (moneromooo-monero)
2016-02-23unit_tests: update test openalias addressmoneromooo-monero1-1/+1
It was recently changed
2016-02-22move g_test_dbg_lock_sleep from a global to a function level staticmoneromooo-monero1-2/+0
This avoids the need to define that variable in every program which uses epee.
2016-02-08unit_tests: fix blockchain unit test after hard fork import fixmoneromooo-monero1-1/+10
2016-02-08unit_tests: fix hard fork unit test compilationmoneromooo-monero1-0/+4
2016-02-08Merge pull request #641Riccardo Spagni1-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)
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-01-21OpenBSD support for Monero.me0wmix1-2/+2
2016-01-16Fix 30f92f5630bbc7507708275a29a9ae7acf633a5bHoward Chu1-0/+1
Needed to add the corresponding (dummy) method to unit test hardfork
2016-01-02unit_tests: initialize db object in ctor, not openmoneromooo-monero1-1/+2
open isn't actually called in those tests
2015-12-31updated copyright yearRiccardo Spagni25-25/+25
2015-12-30unit_tests: remove an unused variablemoneromooo-monero1-1/+0
2015-12-30unit_tests: fix hardfork test buildmoneromooo-monero1-0/+1
The dummy blockchain class needed to have the newly added is_read_only virtual function.
2015-12-26tests: add a unit test for canonical decomposed amountsmoneromooo-monero2-0/+84
2015-12-24unit_tests: fix hard fork testsmoneromooo-monero1-1/+2
A couple stopped passing when the hard fork code was made to reject incoming hard fork versions it did not know about.
2015-12-24unit_tests: new test for IP blockingmoneromooo-monero2-0/+169
2015-12-13unit_tests: fix block reward test using post hard fork settingsmoneromooo-monero1-15/+15
This would fail, as the post hard fork settings would yield different data, and the test expects pre hard fork data.
2015-12-13tests: fix a typo in test namemoneromooo-monero1-1/+1
2015-12-05blockchain_db: make the indexing base a BlockchainDB virtual functionmoneromooo-monero1-0/+1
2015-11-24hardfork: fix more major/minor issuesmoneromooo-monero1-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.
2015-11-13Adjust difficulty target (2 min) and full reward zone (60 kbytes) for block ↵Javier Smooth1-7/+7
version 2
2015-11-10hardfork: add a get_ideal_version(uint64_t) functionmoneromooo-monero1-0/+22
It returns the ideal version for a given height, which is based on the minimum height for a fork, disregarding votes
2015-11-08hardfork: allow per-fork voting thresholdsmoneromooo-monero1-0/+28
And setup the first fork to not vote
2015-11-03unit_tests: fix build without berkeleydbmoneromooo-monero1-1/+7
2015-10-27Remove some old/obsolete/unused codemoneromooo-monero1-1/+0
git history's here if needed to get any of this back
2015-10-26Build fixes for the old blockchain_storage versionmoneromooo-monero1-0/+5
2015-10-21hardfork: switch voting to block minor versionmoneromooo-monero1-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.
2015-10-21unit_tests: remove leftover debug traces in hardfork testmoneromooo-monero1-2/+0
2015-09-27hardfork: rescan speedupmoneromooo-monero1-8/+8
Add a block height before which version 1 is assumed Use DB transactions
2015-09-27hardfork: change window semantics to not count the newly added blockmoneromooo-monero1-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).
2015-09-20hardfork: most state now saved to the DBmoneromooo-monero1-142/+200
There will be a delay on first load of an existing blockchain as it gets reparsed for this state data.
2015-09-12New hardfork classmoneromooo-monero2-1/+396
This keeps track of voting via block version, in order to decide when to enable a particular fork's code.
2015-08-27dns: make ctor privatemoneromooo-monero1-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.
2015-07-26Fix block_reward unit testsRostislav1-10/+10
2015-06-20Set dnssec_valid value correctly in dns_utils; fix address_from_url testRostislav1-1/+2
2015-05-31cleaning up, removing redundant files, renaming, fixing incorrect licensesRiccardo Spagni2-2/+2
2015-05-19Allow name@domain.tld for OpenAlias lookupswarptangent2-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
2015-04-10[fix] log level change. compilation: dns, testsrfree2monero1-1/+1
old unbound #warning does not block compilation unit tests build fine. Even though the RPC/P2P network type is required again
2015-04-07Merge BlockchainDB into upstreamThomas Winget2-0/+327
2015-04-01Merge remote-tracking branch 'monero-official/master' into network-1.6-work1rfree2monero2-5/+37
2015-03-29Merge upstream into blockchainThomas Winget1-2/+34
2015-03-25update berkeleydb branch to blockchain branchThomas Winget2-3/+3
2015-03-25Merge upstream updates into blockchain branchThomas Winget2-3/+3
2015-03-24DNSSEC added (hardcoded key)Thomas Winget1-2/+34
DNSSEC is now implemented with the hardcoded key from unbound. This will need to be not hardcoded in the future, but is okay for now. Unit tests updated for DNSSEC (as well as for the fact that, contrary to previous assumption, example.com does not have a static IP address).
2015-03-16BerkeleyDB Blockchain building, not working yetThomas Winget1-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.
2015-03-16CMake wiring, minor cleanup, minor test additionThomas Winget2-1/+3
Make Cmake things aware of BerkeleyDB and BlockchainBDB Make the BlockchainDB unit tests aware of BlockchainBDB
2015-03-10Fixed includes in BlockchainDB unit testsThomas Winget1-2/+2
2015-02-28move website and DNS unit tests from monero.cc to getmonero.orgRiccardo Spagni2-3/+3
2015-02-242014 network limit 1.3 fix log/path/data +utilsrfree2monero1-0/+2
+toc -doc -drmonero Fixed the windows path, and improved logging and data (for graph) logging, fixed some locks and added more checks. Still there is a locking error, not added by my patches, but present in master version (locking of map/list of peers).
2015-02-202014 network limit 1.0a +utils +toc -doc -drmonerorfree2monero1-0/+1
commands and options for network limiting works very well e.g. for 50 KiB/sec up and down ToS (QoS) flag peer number limit TODO some spikes in ingress/download TODO problems when other up and down limit added "otshell utils" - simple logging (with colors, text files channels)
2015-01-07add BlockchainDB tests to new cmakeThomas Winget1-0/+1
2015-01-04BlockchainDB unit tests, lmdb linker flagThomas Winget1-6/+22
Some BlockchainDB unit testing fleshed out (and working), rudimentary linker flag for lmdb in CMakeLists, but should probably be done "correctly" at some point (find it on whatever system you're building on and all that jazz). update for rebase (warptangent 2015-01-04) fix conflicts with upstream CMakeLists.txt files tests/CMakeLists.txt (remove edits from original commit)
2015-01-04Initial commit of BlockchainDB tests, other miscThomas Winget1-0/+290
miscellaneous changes to BlockchainDB/blockchain as well, namely replacing instances of std::list with std::vector
2015-01-02year updated in licenseRiccardo Spagni21-21/+21
2014-10-24cmake: support 2.8.7Ben Boeckel1-1/+1
Older versions of CMake support LINK_{PUBLIC,PRIVATE} while newer versions prefer PUBLIC and PRIVATE instead, but still support the LINK_ prefix.
2014-10-23gtest: support an external gtestBen Boeckel1-1/+1
2014-10-23cmake: put each test executable in its own directoryBen Boeckel1-0/+80
2014-10-23Merge pull request #182Riccardo Spagni5-35/+43
1795c38 fixed unit tests (Riccardo Spagni) bc537ac miniupnpc static define change (Riccardo Spagni)
2014-10-20Apple and BSD don't need malloc.hRiccardo Spagni1-1/+5
2014-10-15removed unecessary mnemonics testRiccardo Spagni1-13/+0
2014-10-15Merge pull request #176Riccardo Spagni1-0/+167
b94b8cd Added unit test. Fails for Japanese for some reason. (Oran Juice) 4c8a628 Remove iostream header put in during testing (Oran Juice) 9875f5b Variable unique prefix lengths for seed (Oran Juice)
2014-10-08fixed unit testsRiccardo Spagni5-35/+43
2014-10-08Added unit test. Fails for Japanese for some reason.Oran Juice1-0/+167
2014-10-06tests: add a test for slow_memmemmoneromooo-monero1-0/+126
2014-09-30reload checkpoints file every ~hr and print if any failThomas Winget1-0/+1
also some other minor bug squashing and code formatting
2014-09-30updated DNSResolver/things that use it for DNSSECThomas Winget1-9/+17
Note: DNSResolver does not yet *use* DNSSEC, but rather this commit is preparation for including DNSSEC validation. The function in src/wallet/wallet2.cpp that uses DNSResolver still needs its parameters updated accordingly.
2014-09-25Revert "low risk, potentially varint overflow bug patched thanks to BBR"Riccardo Spagni1-31/+0
This reverts commit 4e2b2b942daa4206ec44c66e59863670dfe3fde4.
2014-09-24low risk, potentially varint overflow bug patched thanks to BBRRiccardo Spagni1-0/+31
2014-09-23change to allow (at least a bit) for multiple TXT recordsThomas Winget2-7/+17
2014-09-23Monero addres from DNS TXT record implemented, tests passThomas Winget2-0/+141
Still need to deal with DNSSEC and optional fields in the TXT record.
2014-09-23ipv4 and ipv6 resolution workingThomas Winget1-0/+65
IPv4 and IPv6 name resolution working. Unit tests written (and passing). net_node.{h,inl} code modified to use DNS seeds.
2014-09-15Separate testnet address prefixZachary Michaels1-8/+8
2014-09-15Reorganize testnet constantsZachary Michaels2-5/+9
2014-07-23License updated to BSD 3-clausefluffypony16-48/+464
2014-05-25add checkpoints.cpp in unit testsmydesktop1-0/+140
2014-05-03initial [broken] updatemydesktop1-26/+106
2014-04-02json rpc for wallet and bugfixAntonio Juarez4-50/+171
2014-03-20some fixesAntonio Juarez3-5/+147
2014-03-03moved all stuff to githubAntonio Juarez13-0/+2380