Commit graph

28 commits

Author SHA1 Message Date
Wladimir J. van der Laan
3fc6846181 Add licenses for tests and test data
- 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
2014-03-18 10:20:55 +01:00
Gavin Andresen
356cfe8306 Python-based regression tests
skeleton.py : a do-nothing test skeleton
listtransactions.py : start of regression test for listtransactions call
2014-02-28 15:24:31 -05:00
Gavin Andresen
93a18a3650 Remove CWalletTx::vfSpent
Use the spent outpoint multimap to figure out which wallet transaction
outputs are unspent, instead of a vfSpent array that is saved
to disk.
2014-02-26 11:53:51 -05:00
Gavin Andresen
a16ad1c0f4 Merge pull request #3704 from gavinandresen/wallet_lock_fixes
Wallet locking fixes for -DDEBUG_LOCKORDER
2014-02-24 14:39:23 -05:00
Gavin Andresen
41dcf61504 Test for walletbackup/walletdump RPC calls 2014-02-24 12:58:40 -05:00
Gavin Andresen
ca4cf5cff6 Wallet locking fixes for -DDEBUG_LOCKORDER
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.
2014-02-18 12:11:46 -05:00
Gavin Andresen
731b89b8b5 Track and report wallet transaction clones
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.
2014-02-14 18:13:42 -05:00
Gavin Andresen
2b72d46f42 Handle "conflicted" transactions properly
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.
2014-02-14 11:08:40 -05:00
Gavin Andresen
f582eda4ed Make qa/rpc-tests/ compatible with OSX
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.
2014-02-13 14:25:38 -05:00
Cory Fields
371f3f6ba5 qt5: fix --with-qt with no arguments 2014-01-10 16:30:33 -05:00
Wladimir J. van der Laan
5fe19d640e qt: make wallet test consistent
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.
2013-12-20 17:12:39 +01:00
Gavin Andresen
9e7776bf1f Integration tests via RPC calls
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.
2013-11-27 14:21:05 +10:00
Brandon Dahler
2b91707469 Update build docs that refer to old makefile.* files.
Also update pull-tester's error message.
2013-11-10 21:36:13 -06:00
Matt Corallo
338d24bb00 Skip comparison tool on win32 since Wine breaks it 2013-11-04 00:40:39 -05:00
Matt Corallo
b2b7bf4bf9 Missed an RPC port 2013-10-28 03:53:35 -04:00
Matt Corallo
f1f72e535c Fix port binding by listening on port $BASHPID 2013-10-28 03:43:09 -04:00
Matt Corallo
a18a408067 Run block tester and test suite on Windows too (only on Jenkins) 2013-10-28 03:20:12 -04:00
Matt Corallo
473eabada2 Gracefully handle the case when a DISTDIR already exists 2013-10-28 03:12:14 -04:00
Matt Corallo
a27253dc00 pull-tester.py: Re-enable coverage msg, new args to run test script 2013-10-28 01:22:07 -04:00
Matt Corallo
47b9374e39 Make large-reorg tests optional in block-tester 2013-10-28 01:16:41 -04:00
Matt Corallo
95fa14da69 Re-enable BitcoindComparisonTool:
* 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
2013-10-27 03:38:04 -04:00
Gavin Andresen
38a94488ce Disable code-coverage builds for now
Not working on the pull-tester machine, 'make cov' hangs there.
2013-10-11 14:50:02 +10:00
Gavin Andresen
0dd127a791 Rework pull-tester scripts, disable blockchain tester
Re-organize the pull-tester scripts a bit.

And disables running the blockchain tester, it is not working properly
on the pull-tester machine for reasons I cannot explain (fails to start).
2013-10-11 14:50:02 +10:00
Gavin Andresen
583484a656 Re-enable win32 pull-testing 2013-10-08 10:49:50 +10:00
Gavin Andresen
9196f38c8f Tweaks to the top-level pull-tester script 2013-09-20 15:55:05 +10:00
Gavin Andresen
3ee673a2c9 Rename BitcoinjBitcoindComparisonTool just BitcoindComparisonTool 2013-09-20 13:33:07 +10:00
Gavin Andresen
5d56b4574f Master pull-tester-driver python script 2013-09-20 08:49:36 +10:00
Cory Fields
35b8af9226 autotools: switch to autotools buildsystem 2013-09-05 21:31:03 -04:00