aboutsummaryrefslogtreecommitdiff
path: root/qa
Commit message (Collapse)AuthorAgeFilesLines
* tests: fix test-runner for osx. Closes ##4708Cory Fields2014-08-151-1/+1
| | | | Use the more portable $$ rather than $BASHPID
* Merge pull request #4612Wladimir J. van der Laan2014-08-041-1/+1
|\ | | | | | | | | 6548cc9 test: don't let the port number exceed the legal range (Cory Fields) a67eef1 test: redirect comparison tool output to stdout (Cory Fields)
| * test: don't let the port number exceed the legal rangeCory Fields2014-07-311-1/+1
| |
* | Implement "getchaintips" RPC command to monitor blockchain forks.Daniel Kraft2014-08-031-0/+24
|/ | | | | | | | Port over https://github.com/chronokings/huntercoin/pull/19 from Huntercoin: This implements a new RPC command "getchaintips" that can be used to find all currently active chain heads. This is similar to the -printblocktree startup option, but it can be used without restarting just via the RPC interface on a running daemon.
* Merge pull request #4522 from dgenr8/set_discover_0Gavin Andresen2014-07-151-2/+2
|\ | | | | Set -discover=0 in regtest framework
| * Set -discover=0 in regtest frameworkTom Harding2014-07-131-2/+2
| | | | | | | | | | | | The regtest framework is local, so often there is no need to discover our external IP. Setting -discover=0 in util.py works around shutdown hang caused by GetExternalIP waiting in recv().
* | Merge pull request #4378Wladimir J. van der Laan2014-07-141-1/+1
|\ \ | | | | | | | | | dc942e6 Introduce whitelisted peers. (Pieter Wuille)
| * | Introduce whitelisted peers.Pieter Wuille2014-07-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a -whitelist option to specify subnet ranges from which peers that connect are whitelisted. In addition, there is a -whitebind option which works like -bind, except peers connecting to it are also whitelisted (allowing a separate listen port for trusted connections). Being whitelisted has two effects (for now): * They are immune to DoS disconnection/banning. * Transactions they broadcast (which are valid) are always relayed, even if they were already in the mempool. This means that a node can function as a gateway for a local network, and that rebroadcasts from the local network will work as expected. Whitelisting replaces the magic exemption localhost had for DoS disconnection (local addresses are still never banned, though), which implied hidden service connects (from a localhost Tor node) were incorrectly immune to DoS disconnection as well. This old behaviour is removed for that reason, but can be restored using -whitelist=127.0.0.1 or -whitelist=::1 can be specified. -whitebind is safer to use in case non-trusted localhost connections are expected (like hidden services).
* | | Merge pull request #4503Wladimir J. van der Laan2014-07-142-1/+97
|\ \ \ | |_|/ |/| | | | | | | | b45a6e8 Add test for getblocktemplate longpolling (Wladimir J. van der Laan) ff6a7af getblocktemplate: longpolling support (Luke Dashjr)
| * | Add test for getblocktemplate longpollingWladimir J. van der Laan2014-07-112-1/+97
| |/
* / `getrawchangeaddress` should fail when keypool exhaustedWladimir J. van der Laan2014-07-111-0/+132
|/ | | | | | | | | | | | An user on IRC reported an issue where `getrawchangeaddress` keeps returning a single address when the keypool is exhausted. In my opinion this is strange behaviour. - Change CReserveKey to fail when running out of keys in the keypool. - Make `getrawchangeaddress` return RPC_WALLET_KEYPOOL_RAN_OUT when unable to create an address. - Add a Python RPC test for checking the keypool behaviour in combination with encrypted wallets.
* Print better errors, and add util stop_node() function.Gavin Andresen2014-07-092-5/+14
|
* Refactor common RPC test code to BitcoinTestFramework base classGavin Andresen2014-07-096-500/+334
| | | | | | Inspired by #3956, with a little more flexibility built in. I didn't touch rpcbind_test.py, because it only runs on Linux.
* Improved logging and Decimal supportGavin Andresen2014-07-081-7/+23
|
* rpc-tests: Fix rpcbind_test after 0193fb8Wladimir J. van der Laan2014-06-271-10/+12
| | | | | Port number for RPC is no longer static as multiple tests could be running at once.
* Merge pull request #3674Wladimir J. van der Laan2014-06-242-0/+169
|\ | | | | | | 77cbd46 Let -zapwallettxes recover transaction meta data (Cozz Lovan)
| * Let -zapwallettxes recover transaction meta dataCozz Lovan2014-06-162-0/+169
| |
* | qa/rpc_tests: Wait for handshake to complete in connect_nodesWladimir J. van der Laan2014-06-231-0/+4
| | | | | | | | | | | | | | This avoids a race condition in which the connection was made but the version handshake is not completed yet. In that case transactions won't be broadcasted to a peer yet, and the nodes will wait forever for their mempools to sync.
* | Merge pull request #3960Wladimir J. van der Laan2014-06-231-0/+225
|\ \ | |/ |/| | | 3f9a019 added list/get received by address/ account tests (Alon Muroch)
| * added list/get received by address/ account testsAlon Muroch2014-04-021-0/+225
| | | | | | | | | | | | | | | | fixed some annotations and cleaned a bit received by tests d
* | estimatefee / estimatepriority RPC methodsGavin Andresen2014-06-062-18/+267
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New RPC methods: return an estimate of the fee (or priority) a transaction needs to be likely to confirm in a given number of blocks. Mike Hearn created the first version of this method for estimating fees. It works as follows: For transactions that took 1 to N (I picked N=25) blocks to confirm, keep N buckets with at most 100 entries in each recording the fees-per-kilobyte paid by those transactions. (separate buckets are kept for transactions that confirmed because they are high-priority) The buckets are filled as blocks are found, and are saved/restored in a new fee_estiamtes.dat file in the data directory. A few variations on Mike's initial scheme: To estimate the fee needed for a transaction to confirm in X buckets, all of the samples in all of the buckets are used and a median of all of the data is used to make the estimate. For example, imagine 25 buckets each containing the full 100 entries. Those 2,500 samples are sorted, and the estimate of the fee needed to confirm in the very next block is the 50'th-highest-fee-entry in that sorted list; the estimate of the fee needed to confirm in the next two blocks is the 150'th-highest-fee-entry, etc. That algorithm has the nice property that estimates of how much fee you need to pay to get confirmed in block N will always be greater than or equal to the estimate for block N+1. It would clearly be wrong to say "pay 11 uBTC and you'll get confirmed in 3 blocks, but pay 12 uBTC and it will take LONGER". A single block will not contribute more than 10 entries to any one bucket, so a single miner and a large block cannot overwhelm the estimates.
* | Allow multiple regression tests to run at onceGavin Andresen2014-06-061-15/+22
| | | | | | | | | | Choose ports at startup based on PID, so multiple regression tests can run on the same system at the same time.
* | Add Python test for -rpcbind and -rpcallowipWladimir J. van der Laan2014-05-133-4/+314
| | | | | | | | | | Add a new test, `rpcbind_test.py`, that extensively tests the new `-rpcbind` functionality.
* | Merge pull request #4074Wladimir J. van der Laan2014-05-021-11/+18
|\ \ | | | | | | | | | d3081fa Removed LevelDB changes (super3)
| * | Removed LevelDB changessuper32014-05-011-11/+18
| | | | | | | | | | | | Syntax Highlighting
* | | stop bitcoind/bitcoin-cli processes that might have been left runningGavin Andresen2014-05-021-0/+3
|/ /
* / Have pull-tester run the listtransactions.py regression testGavin Andresen2014-04-022-5/+11
|/ | | | | This should show how to run a python-based regression test successfully in the pull-tester environment.
* Fix regression testsGavin Andresen2014-03-247-17/+186
| | | | | | | Taught bitcoind to close the HTTP connection after it gets a 'stop' command, to make it easier for the regression tests to cleanly stop. Move bitcoinrpc files to correct location. Tidied up the python-based regression tests.
* Add licenses for tests and test dataWladimir J. van der Laan2014-03-1813-0/+43
| | | | | | | | - Add license headers to source files (years based on commit dates) in `src/test` as well as `qa` - Add `README.md` to `src/test/data` specifying MIT license Fixes #3848
* Python-based regression testsGavin Andresen2014-02-285-14/+392
| | | | | skeleton.py : a do-nothing test skeleton listtransactions.py : start of regression test for listtransactions call
* Remove CWalletTx::vfSpentGavin Andresen2014-02-265-53/+197
| | | | | | Use the spent outpoint multimap to figure out which wallet transaction outputs are unspent, instead of a vfSpent array that is saved to disk.
* Merge pull request #3704 from gavinandresen/wallet_lock_fixesGavin Andresen2014-02-241-2/+4
|\ | | | | Wallet locking fixes for -DDEBUG_LOCKORDER
| * Wallet locking fixes for -DDEBUG_LOCKORDERGavin Andresen2014-02-181-2/+4
| | | | | | | | | | | | | | | | | | | | | | Compiling with -DDEBUG_LOCKORDER and running the qa/rpc-test/ regression tests uncovered a couple of wallet methods that should (but didn't) acquire the cs_wallet mutext. I also changed the AssertLockHeld() routine print to stderr and abort, instead of printing to debug.log and then assert()'ing. It is annoying to look in debug.log to find out which AssertLockHeld is failing.
* | Test for walletbackup/walletdump RPC callsGavin Andresen2014-02-242-2/+314
|/
* Track and report wallet transaction clonesGavin Andresen2014-02-141-3/+7
| | | | | | | | | | Adds a "walletconflicts" array to transaction info; if a wallet transaction is mutated, the alternate transaction id or ids are reported there (usually the array will be empty). Metadata from the original transaction is copied to the mutant, so the transaction time and "from" account of the mutant are reported correctly.
* Handle "conflicted" transactions properlyGavin Andresen2014-02-141-0/+144
| | | | | | | | | | | | | | | | | | | | Extend CMerkleTx::GetDepthInMainChain with the concept of a "conflicted" transaction-- a transaction generated by the wallet that is not in the main chain or in the mempool, and, therefore, will likely never be confirmed. GetDepthInMainChain() now returns -1 for conflicted transactions (0 for unconfirmed-but-in-the-mempool, and >1 for confirmed). This makes getbalance, getbalance '*', and listunspent all agree when there are mutated transactions in the wallet. Before: listunspent: one 49BTC output getbalance: 96 BTC (change counted twice) getbalance '*': 46 BTC (spends counted twice) After: all agree, 49 BTC available to spend.
* Make qa/rpc-tests/ compatible with OSXGavin Andresen2014-02-132-1/+15
| | | | | | | Reworked send.sh, so it works properly on my Mac (killall send.sh doesn't work, because the process name is 'bash' not 'send.sh'). So now send.sh writes a .send.pid file, and invoking it as send.sh -STOP (as the bitcoind -walletnotify) signals that PID.
* qt5: fix --with-qt with no argumentsCory Fields2014-01-103-2/+18
|
* qt: make wallet test consistentWladimir J. van der Laan2013-12-202-5/+26
| | | | | | | Add a function `WaitBlocks` to wait for blocks to propagate to all three nodes, and use this instead of waiting a fixed time of one second. Fixes #3445.
* Integration tests via RPC callsGavin Andresen2013-11-274-0/+190
| | | | | | qa/rpc-tests/wallet.sh runs a three-node -regtest network, generates a fresh blockchain, and then exercises basic wallet sending/receiving functionality using command-line RPC.
* Update build docs that refer to old makefile.* files.Brandon Dahler2013-11-101-1/+1
| | | | Also update pull-tester's error message.
* Skip comparison tool on win32 since Wine breaks itMatt Corallo2013-11-041-1/+1
|
* Missed an RPC portMatt Corallo2013-10-281-1/+1
|
* Fix port binding by listening on port $BASHPIDMatt Corallo2013-10-281-3/+4
|
* Run block tester and test suite on Windows too (only on Jenkins)Matt Corallo2013-10-281-1/+11
|
* Gracefully handle the case when a DISTDIR already existsMatt Corallo2013-10-281-4/+9
|
* pull-tester.py: Re-enable coverage msg, new args to run test scriptMatt Corallo2013-10-281-2/+7
|
* Make large-reorg tests optional in block-testerMatt Corallo2013-10-281-3/+8
|
* Re-enable BitcoindComparisonTool:Matt Corallo2013-10-272-5/+2
| | | | | | | * Use the latest version, with limited memory usage, and path to on-disk db (try mouting qa/tmp on a tmpfs)\ * enable -debug=net * re-enable BitcoindComparisonTool in pull-tester
* Disable code-coverage builds for nowGavin Andresen2013-10-111-11/+9
| | | | Not working on the pull-tester machine, 'make cov' hangs there.