Commit graph

247 commits

Author SHA1 Message Date
Wladimir J. van der Laan 17d0e638b6
Merge pull request #6686
745f909 travis: install a recent libzmq and pyzmq for tests (Cory Fields)
a9c27cd [travis] add zmq python module (Jonas Schnelli)
110a1fd enable zmq-test in rpc-tests.sh (Jonas Schnelli)
2015-10-01 16:22:26 +02:00
Cory Fields 745f909925 travis: install a recent libzmq and pyzmq for tests 2015-10-01 15:40:57 +02:00
Jonas Schnelli a9c27cdf55 [travis] add zmq python module 2015-10-01 14:02:26 +02:00
Wladimir J. van der Laan 48efbdbe98
Merge pull request #5264
af3208b Resolve issue 3166. These changes decode valid SIGHASH types on signatures in assembly (asm) representations of scriptSig scripts. This squashed commit incorporates substantial helpful feedback from jtimon, laanwj, and sipa. (mruddy)
2015-09-25 19:19:07 +02:00
Suhas Daftuar 598b25d5ee Add test showing bug in mempool packages 2015-09-23 15:12:19 -04:00
Wladimir J. van der Laan e59d2a80f9
Merge pull request #6315
7aac6db [QT] dump banlist to disk in case of ban/unban over QT (Jonas Schnelli)
7f90ea7 [QA] adabt QT_NO_KEYWORDS for QT ban implementation (Jonas Schnelli)
07f70b2 [QA] fix netbase tests because of new CSubNet::ToString() output (Jonas Schnelli)
4ed0510 [Qt] call DumpBanlist() when baning unbaning nodes (Philip Kaufmann)
be89292 [Qt] reenabling hotkeys for ban context menu, use different words (Jonas Schnelli)
b1189cf [Qt] adapt QT ban option to banlist.dat changes (Jonas Schnelli)
65abe91 [Qt] add sorting for bantable (Philip Kaufmann)
51654de [Qt] bantable polish (Philip Kaufmann)
cdd72cd [Qt] simplify ban list signal handling (Philip Kaufmann)
43c1f5b [Qt] remove unused timer-code from banlistmodel.cpp (Jonas Schnelli)
e2b8028 net: Fix CIDR notation in ToString() (Wladimir J. van der Laan)
9e521c1 [Qt] polish ban table (Philip Kaufmann)
607809f net: use CIDR notation in CSubNet::ToString() (Jonas Schnelli)
53caec6 [Qt] bantable overhaul (Jonas Schnelli)
f0bcbc4 [Qt] bantable fix timestamp 64bit issue (Jonas Schnelli)
6135309 [Qt] banlist, UI optimizing and better signal handling (Jonas Schnelli)
770ca79 [Qt] add context menu with unban option to ban table (Jonas Schnelli)
5f42132 [Qt] add ui signal for banlist changes (Jonas Schnelli)
ad204df [Qt] add banlist table below peers table (Jonas Schnelli)
50f0908 [Qt] add ban functions to peers window (Jonas Schnelli)
2015-09-22 13:39:38 +02:00
Wladimir J. van der Laan 5e21388c48
Merge pull request #6695
ddf98d1 Make RPC tests cope with server-side timeout between requests (Wladimir J. van der Laan)
2190ea6 rpc: Split option -rpctimeout into -rpcservertimeout and -rpcclienttimeout (Wladimir J. van der Laan)
8b2d6ed http: Disable libevent debug logging, if not explicitly enabled (Wladimir J. van der Laan)
5ce43da init: Ignore SIGPIPE (Wladimir J. van der Laan)
2015-09-21 17:16:40 +02:00
Wladimir J. van der Laan ddf98d1d84 Make RPC tests cope with server-side timeout between requests
Python's httplib does not graciously handle disconnections from the http server, resulting in BadStatusLine errors.
See https://bugs.python.org/issue3566 "httplib persistent connections violate MUST in RFC2616 sec 8.1.4."

This was fixed in Python 3.5.

Work around it for now.
2015-09-21 17:15:37 +02:00
Suhas Daftuar 5add7a74a6 Track transaction packages in CTxMemPoolEntry
Associate with each CTxMemPoolEntry all the size/fees of descendant
mempool transactions.  Sort mempool by max(feerate of entry, feerate
of descendants).  Update statistics on-the-fly as transactions enter
or leave the mempool.

Also add ancestor and descendant limiting, so that transactions can
be rejected if the number or size of unconfirmed ancestors exceeds
a target, or if adding a transaction would cause some other mempool
entry to have too many (or too large) a set of unconfirmed in-
mempool descendants.
2015-09-19 13:25:48 -04:00
Jonas Schnelli 110a1fd727 enable zmq-test in rpc-tests.sh 2015-09-17 20:04:34 +02:00
Jeff Garzik 83f0e22497
Temporarily disable ZMQ tests in bitcoin test suite 2015-09-17 11:44:55 -04:00
Jonas Schnelli 312cfe63a3 fix rpc-tests.sh
`${testScripts[@]}` now does split up `testscript --agument` in two elements pushed to the array (`testscript` and `--agument`).
2015-09-17 15:45:14 +02:00
Jonas Schnelli 07f70b2dde [QA] fix netbase tests because of new CSubNet::ToString() output 2015-09-16 16:50:20 +02:00
Jonas Schnelli 029e278286 QA: Add ZeroMQ RPC test 2015-09-16 11:01:35 +01:00
Cory Fields 1136879df8 Depends: Add ZeroMQ package 2015-09-16 10:59:32 +01:00
Wladimir J. van der Laan d528025517 Revert "rpc-tests: re-enable rpc-tests for Windows"
This reverts commit bd30c3dced.

Disable windows RPC tests for now. These should be re-enabled once a
suitable Wine version is used on Travis.
2015-09-04 11:01:44 +02:00
Wladimir J. van der Laan ee2a42b447 tests: GET requests cannot have request body, use POST in rest.py
Sending a request body with GET request is not valid in HTTP spec, and
not compatible with evhttpd.
2015-09-02 18:38:42 +02:00
Wladimir J. van der Laan 8f9301cdaa qa: Remove -rpckeepalive tests from httpbasics
This option was a temporary workaround, and is no longer necessary
with the new web server.
2015-09-02 18:38:41 +02:00
ptschip 060058e955 Enable python tests for Native Windows
1) Multiplatorm support for devnull
2) Fixed a bug in the handling of cache files
3) Deleted run-bitcoin-cli as no longer needed
2015-08-26 10:59:22 -07:00
Cory Fields bd30c3dced rpc-tests: re-enable rpc-tests for Windows 2015-08-25 12:03:28 -04:00
Casey Rodarmor 0ce73985a8 Add p2p-fullblocktest.py 2015-08-21 15:31:37 -04:00
Wladimir J. van der Laan 80cddbbba9
Merge pull request #6539
9f68ed6 typofixes (found by misspell_fixer) (Veres Lajos)
2015-08-19 17:28:00 +02:00
Daniel Kraft 2016576998 Fix crash when mining with empty keypool.
Since the introduction of the ScriptForMining callback, the mining
functions (setgenerate and generate) crash with an assertion failure
(due to a NULL pointer script returned) if the keypool is empty.  Fix
this by giving a proper error.
2015-08-18 09:07:33 +02:00
Wladimir J. van der Laan bb4faee21e
Merge pull request #6509
45a6cce Fix race condition on test node shutdown (Casey Rodarmor)
2015-08-17 16:45:22 +02:00
Jeff Garzik 6feeec1ec5
Merge pull request #6013 2015-08-15 16:09:06 -04:00
Wladimir J. van der Laan ddd8d80c63
Merge pull request #6415
d042854 SQUASH "Implement watchonly support in fundrawtransaction" (Matt Corallo)
428a898 SQUASH "Add have-pubkey distinction to ISMINE flags" (Matt Corallo)
6bdb474 Implement watchonly support in fundrawtransaction (Matt Corallo)
f5813bd Add logic to track pubkeys as watch-only, not just scripts (Matt Corallo)
d3354c5 Add have-pubkey distinction to ISMINE flags (Matt Corallo)
5c17059 Update importaddress help to push its use to script-only (Matt Corallo)
a1d7df3 Add importpubkey method to import a watch-only pubkey (Matt Corallo)
907a425 Add p2sh option to importaddress to import redeemScripts (Matt Corallo)
983d2d9 Split up importaddress into helper functions (Matt Corallo)
cfc3dd3 Also remove pay-2-pubkey from watch when adding a priv key (Matt Corallo)
2015-08-14 16:28:37 +02:00
Pavel Janík 70180b2e57 Implement REST mempool API, add test and documentation. 2015-08-14 07:01:03 +02:00
Casey Rodarmor 45a6cce971 Fix race condition on test node shutdown 2015-08-12 11:02:43 -04:00
Veres Lajos 9f68ed6b6d typofixes (found by misspell_fixer) 2015-08-10 22:06:27 +01:00
mruddy af3208bfa6 Resolve issue 3166.
These changes decode valid SIGHASH types on signatures in assembly (asm) representations of scriptSig scripts.
This squashed commit incorporates substantial helpful feedback from jtimon, laanwj, and sipa.
2015-07-30 19:56:00 -04:00
Wladimir J. van der Laan 675d2feffa
Merge pull request #6224
59b49cd Eliminate signed/unsigned comparison warning (Suhas Daftuar)
04b5d23 Replace sleep with syncing using pings (Suhas Daftuar)
6b1066f Ignore whitelisting during IBD for unrequested blocks. (Suhas Daftuar)
bfc30b3 Ignore unrequested blocks too far ahead of tip (Suhas Daftuar)
2015-07-29 20:04:15 +02:00
Jonas Schnelli 7d226b7ca0 [QA] add testcases for parsing strings as values 2015-07-27 13:55:46 +02:00
Wladimir J. van der Laan bfd807ff32
Merge pull request #6456
ec249d4 util: use locale-independent parsing in ParseDouble (Wladimir J. van der Laan)
7650449 univalue: Avoid unnecessary roundtrip through double for numbers (Wladimir J. van der Laan)
e061e27 rpc: Make ValueFromAmount always return 8 decimals (Wladimir J. van der Laan)
2015-07-24 11:08:52 +02:00
Casey Rodarmor 56b28fca46 Don't share objects between TestInstances 2015-07-22 12:03:16 -04:00
Matt Corallo 6bdb474dc9 Implement watchonly support in fundrawtransaction
Some code and test cases stolen from
Bryan Bishop <bryan@ledgerx.com> (pull #5524).
2015-07-20 16:01:38 -07:00
Matt Corallo 907a425aa5 Add p2sh option to importaddress to import redeemScripts 2015-07-20 16:01:37 -07:00
zathras-crypto 0aad1f13b2
Exempt unspendable transaction outputs from dust checks
Since unspendable outputs can't be spent, there is no threshold at which it would be uneconomic to spend them.

This primarily targets transaction outputs with `OP_RETURN`.

---

Initially based on:

commit 9cf0ae26350033d43d5dd3c95054c0d1b1641eda
Author: zathras-crypto <zathrasc@gmail.com>
Date:   Wed Mar 25 02:04:02 2015 -0700

Changes:

- cherry-picked on top of bitcoin:master
- added RPC test for fundrawtransaction
2015-07-18 17:31:55 +02:00
Wladimir J. van der Laan 7650449a67 univalue: Avoid unnecessary roundtrip through double for numbers
JSON makes no distinction between numbers and reals, and our code
doesn't need to do so either.

This removes VREAL, as well as its specific post-processing in
`UniValue::write`. Non-monetary amounts do not need to be forcibly
formatted with 8 decimals, so the extra roundtrip was unnecessary
(and potentially loses precision).
2015-07-18 09:04:18 +02:00
fanquake db42558b82 Remove bash test note from rpc-tests readme 2015-07-15 16:28:49 +08:00
Wladimir J. van der Laan ffad5aa1f4 tests: Remove old sh-based test framework
This removes the `conflictedbalance.sh` test as well, but that test has
been broken for a long time and isn't part of any scripts.
What it does is, IMO, sufficiently tested by other tests.
2015-07-13 08:50:16 +02:00
Jonas Schnelli 9da8fc8f26 [QA] remove rawtransactions.py from the extended test list
rawtransactions.py is already in the standard test list
2015-07-10 22:01:41 +02:00
Jonas Schnelli 6ed38b0b8f [QA] fix possible reorg issue in rawtransaction.py/fundrawtransaction.py RPC test
- added missing mempool sync between block generations
2015-07-10 21:13:33 +02:00
Wladimir J. van der Laan 5121c68657
Merge pull request #6414
8a0b933 Fix intermittent test failure, reduce test time (Tom Harding)
2015-07-10 18:52:43 +02:00
Tom Harding 8a0b933aae Fix intermittent test failure, reduce test time
In txn_clone.py, non-essential test transaction tx2 was asserted
to be unconfirmed, but would occasionally confirm depending on
network behavior.  Fix by explicitly sharing with miner and
checking for 1 confirmation.

Reduce required conflict tests from 4 to 2, by moving one invocation
each of txn_clone.py and txn_doublespend.py to the extented test
section.  This saves about 15 seconds per test run for me.
2015-07-09 18:10:57 -07:00
Jonas Schnelli c45c7ea0fa [REST] add JSON support for /rest/headers/ 2015-07-05 15:48:33 +02:00
Wladimir J. van der Laan 56dc70439f
tests: fix txn_clone.py (retry)
There was a stale .pyc file around from before the move. This should
catch all missing modules and finally fix the travis build.
2015-07-02 23:23:29 +02:00
Wladimir J. van der Laan 66e5465773
Merge pull request #6310
177a0e4 Adding CSubNet constructor over a single CNetAddr (Jonas Schnelli)
409bccf use CBanEntry as object container for banned nodes (Jonas Schnelli)
dfa174c CAddrDB/CBanDB: change filesize variables from int to uint64_t (Jonas Schnelli)
f581d3d banlist.dat: store banlist on disk (Jonas Schnelli)
2015-07-02 21:33:09 +02:00
Wladimir J. van der Laan 3f16971442
tests: fix txn_clone.py
Solve merge conflict of test added in #5881 with #6097.
2015-07-02 20:39:44 +02:00
Jonas Schnelli f581d3d656 banlist.dat: store banlist on disk 2015-07-02 20:29:36 +02:00
Wladimir J. van der Laan 3203a0832a
Merge pull request #5881
5d34e16 Add txn_clone.py test (Tom Harding)
defd2d5 Better txn_doublespend.py test (Tom Harding)
b2b3619 Implement CTransaction::IsEquivalentTo(...) (Tom Harding)
2015-07-02 19:59:50 +02:00