Commit graph

92 commits

Author SHA1 Message Date
Gavin Andresen
34318d7fad RPC-test based on invalidateblock for mempool coinbase spends 2014-12-08 14:09:58 -08:00
Jonas Schnelli
11d7a7d505 [RPC] add rpc-test for http keep-alive (persistent connections) 2014-12-06 23:15:22 +01:00
Wladimir J. van der Laan
c2d7c6134e
Merge pull request #5407
9e56532 Coinbases-in-mempool regression test (Gavin Andresen)
2014-12-03 10:51:36 +01:00
Gavin Andresen
9e56532959
Coinbases-in-mempool regression test
Immature coinbase spends are allowed in the memory pool if they can be mined in the next block.
They are not allowed in the memory pool if they cannot be mined in the next block.

This regression test tests those edge cases.
2014-12-02 19:07:39 -05:00
Gavin Andresen
1c7e09f0b9
Merge pull request #5369
b2d0162 Test resurrecting memory pool transactions during chain re-org (Gavin Andresen)
3dd8ed7 Delay writing block indexes in invalidate/reconsider (Pieter Wuille)
798faec Add 'invalidateblock' and 'reconsiderblock' RPC commands. (Pieter Wuille)
2014-12-02 11:59:41 -05:00
Gavin Andresen
b2d0162ba4
Test resurrecting memory pool transactions during chain re-org
Builds on #5316.
2014-12-02 11:09:25 -05:00
Jonas Schnelli
01dc2d83f8 [REST] add REST interface tests in rpc-test section 2014-12-01 12:52:21 +01:00
Pieter Wuille
1b91be49f5 Report status of chain tips 2014-11-27 11:50:14 +01:00
Wladimir J. van der Laan
37c47e1809
Merge pull request #5333
e4ef724 Edited rpc-tests to run python script not shell script. (mrbandrews)
189fb52 Port of wallet.sh to python (wallet.py). (mrbandrews)
2014-11-21 13:48:41 +01:00
mrbandrews
e4ef724493 Edited rpc-tests to run python script not shell script. 2014-11-20 15:36:34 -05:00
Gavin Andresen
8656dbb095
Port/fix txnmall.sh regression test
Ported txnmall.sh to Python, and updated to match
recent transaction malleability changes.

I also modified it so it tests both double-spending
confirmed and unconfirmed (only-in-mempool) transactions.

Renamed to txn_doublespend, since that is really what is
being tested. And told the pull-tester to run both
variations on this test.
2014-11-19 15:36:10 -05:00
Cory Fields
3c30f27f34
travis: disable rpc tests for windows until they're not so flaky 2014-11-17 14:17:04 -05:00
Cory Fields
c8b115e20b travis: temporarily disable the forknotify test
It appears to be breaking randomly on Windows
2014-11-13 04:09:19 -05:00
Cory Fields
7667850dbf tests: replace the old (unused since Travis) tests with new rpc test scripts 2014-10-31 00:05:55 -04:00
Cory Fields
fa7f8cdc1a tests: remove old pull-tester scripts
They're unused since the switch to Travis
2014-10-31 00:05:55 -04:00
Michael Ford
214091d584 Update license in pull-tester and rpc-tests
Add missing copyright/license header where necessary
2014-10-23 09:48:19 +08:00
Pieter Wuille
e11b2ce4c6 Fix large reorgs 2014-10-14 16:13:42 -07:00
Gavin Andresen
dbca89b74b
Trigger -alertnotify if network is upgrading without you
This adds a -regetest-only undocumented (for regression testing only)
command-line option -blockversion=N to set block.nVersion.

Adds to the "has the rest of the network upgraded to a
block.nVersion we don't understand" code so it calls
-alertnotify when 51 of the last 100 blocks are up-version.
But it only alerts once, not with every subsequent new, upversion
block.

And adds a forknotify.py regression test to make sure it works.

Tested using forknotify.py:

Before adding CAlert::Notify, get:
Assertion failed: -alertnotify did not warn of up-version blocks

Before adding code to only alert once:
Assertion failed: -alertnotify excessive warning of up-version blocks

After final code in this pull:
Tests successful
2014-10-09 10:28:27 -04:00
Cory Fields
5ad450a65a travis: If the comparison-tool fails, dump the tail of the debug log
The entire debug log would be huge, and could cause issues for automated tools
like travis. Printing 200 lines is an initial guess at a reasonable number,
more may be required.
2014-10-01 16:47:33 -04:00
Cory Fields
9322f1a4d9 tests: fix test-runner for osx. Closes ##4708
Use the more portable $$ rather than $BASHPID
2014-08-15 23:17:43 -04:00
Cory Fields
6548cc9f90 test: don't let the port number exceed the legal range 2014-07-31 14:08:22 -04:00
Pieter Wuille
dc942e6f27 Introduce whitelisted peers.
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).
2014-07-09 20:40:14 +02:00
Gavin Andresen
3e7dac9dad stop bitcoind/bitcoin-cli processes that might have been left running 2014-05-02 12:37:20 -04:00
Gavin Andresen
cb4bdd18a7 Have pull-tester run the listtransactions.py regression test
This should show how to run a python-based regression test
successfully in the pull-tester environment.
2014-04-02 19:59:17 -04:00
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
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