aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/test_framework
Commit message (Collapse)AuthorAgeFilesLines
* s/DOGE/DIS/gTomo Ueda2021-09-022-4/+4
|
* really s/Doge/Dis/g this timeTomo Ueda2021-09-023-3/+3
|
* s/doge/dis/gTomo Ueda2021-09-023-14/+14
|
* Merge pull request #2458 from patricklodder/1.14.4-disconnect-bad-node-testRoss Nicoll2021-08-181-0/+4
|\ | | | | Test that peers building on invalid blocks get disconnected
| * fixup p2p-acceptblock and mininode to test disconnectsPatrick Lodder2021-08-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | without partially backporting a new testframework. - Adds a condition to NodeConn that when asyncore calls handle_read without any data, this must be a disconnect and closes the socket - Adds a little loop in the p2p-acceptblock client that waits for the socket to be in a closed state - Makes expected disconnects non-optional in p2p-acceptblock - Syncs the test descriptions and outputs with reality
* | Remove relay-only roundingRoss Nicoll2021-08-171-1/+1
|/ | | | | Remove rounding of transaction sizes when calculating fee minimums for relaying, to simplify fee logic.
* qa: fix p2p-acceptblockPatrick Lodder2021-08-131-1/+1
| | | | | | | | | | | | This test failed because the sheer number of blocks required to trigger the max length of a fork we'd keep, exceed the v4 fork height on regtest. - Adapted the blocktools.py miner to mine 0x00620004 blocks as done elsewhere too (be it suboptimal, but at least consistent) - Adapted the test to work with 1440 blocks (Dogecoin limit) instead of 288 (Bitcoin limit) - Made p2p-acceptblock a standard test instead of an extended test
* Initial back end framework to separate wallet and relay fees + dust.Michi Lumin2021-07-301-1/+1
|
* rpc-tests: don't use binary.hex() or binary.fromhex()Patrick Lodder2020-07-222-8/+10
| | | | To retain compatibility with multiple python3 versions
* rpc-tests: fix auxpow calls to use .target instead of ._targetPatrick Lodder2020-07-221-1/+1
| | | | Tests weren't adapted to reflect RPC output
* rpc-tests: revert from litecoin_scrypt to ltc_scryptPatrick Lodder2020-07-222-6/+6
| | | | | This reflects the dependency installed in the dep script at qa/pull-tester/install-deps.sh
* Update to litecoin_scryptRoss Nicoll2019-07-121-3/+3
| | | | | | The old ltc_scrypt module works on systems it is installed on, but does not install on new systems it appears. Our README says to use litecoin_scrypt, so updating the code to match.
* Rename binaries to match DogecoinRoss Nicoll2019-03-252-13/+13
|
* Update RPC tests for Dogecoin (#1431)Ross Nicoll2018-09-195-18/+134
| | | | | | | | | * Make most of the RPC tests pass * Add AUXPoW rpc tests - Tests the auxpow rpc interface `getauxblock` - Tests consensus constraints for auxpow: - Minimum block height - Valid scrypt proof of work - Foreign chain ID
* Merge AuxPoW support from NamecoreRoss Nicoll2018-09-191-0/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes are as below: Wrap CBlockHeader::nVersion into a new class (CBlockVersion). This allows to take care of interpreting the field into a base version, auxpow flag and the chain ID. Update getauxblock.py for new 'generate' RPC call. Add 'auxpow' to block JSON. Accept auxpow as PoW verification. Add unit tests for auxpow verification. Add check for memory-layout of CBlockVersion. Weaken auxpow chain ID checks for the testnet. Allow Params() to overrule when to check the auxpow chain ID and for legacy blocks. Use this to disable the checks on testnet. Introduce CPureBlockHeader. Split the block header part that is used by auxpow and the "real" block header (that uses auxpow) to resolve the cyclic dependency between the two. Differentiate between uint256 and arith_uint256. This change was done upstream, modify the auxpow code. Add missing lock in auxpow_tests. Fix REST header check for auxpow headers. Those can be longer, thus take that into account. Also perform the check actually on an auxpow header. Correctly set the coinbase for getauxblock results. Call IncrementExtraNonce in getauxblock so that the coinbase is actually initialised with the stuff it should be. (BIP30 block height and COINBASE_FLAGS.) Implement getauxblock plus regression test. Turn auxpow test into FIXTURE test. This allows using of the Params() calls. Move CMerkleTx code to auxpow.cpp. Otherwise we get linker errors when building without wallet. Fix rebase with BIP66. Update the code to handle BIP66's nVersion=3. Enforce that auxpow parent blocks have no auxpow block version. This is for compatibility with namecoind. See also https://github.com/namecoin/namecoin/pull/199. Move auxpow-related parameters to Consensus::Params.
* qa: Check return code when stopping nodesMarcoFalke2017-02-231-14/+5
| | | | | | | This includes work by jnewbery Github-Pull: #9824 Rebased-From: fa4cd2e998e0ebebe283a6243f7f752123a105ab
* Merge #9715: Disconnect peers which we do not receive VERACKs from within 60 secWladimir J. van der Laan2017-02-141-12/+26
|\ | | | | | | | | | | | | 66f861a Add a test for P2P inactivity timeouts (Matt Corallo) b436f92 qa: Expose on-connection to mininode listeners (Matt Corallo) 8aaba7a qa: mininode learns when a socket connects, not its first action (Matt Corallo) 2cbd119 Disconnect peers which we do not receive VERACKs from within 60 sec (Matt Corallo)
| * qa: Expose on-connection to mininode listenersMatt Corallo2017-02-081-0/+2
| |
| * qa: mininode learns when a socket connects, not its first actionMatt Corallo2017-02-081-12/+24
| |
* | Fix RPC failure testingJohn Newbery2017-02-081-3/+20
|/ | | | | | | Make sure that RPC tests are actually checking failures correctly by: - Catching JSON RPC exceptions and verifying the error codes and messages. - Failing the test case if the JSON RPC exception isn't raised.
* Merge #9222: Add 'subtractFeeFromAmount' option to 'fundrawtransaction'.Wladimir J. van der Laan2017-01-121-3/+7
|\ | | | | | | 453bda6 Add 'subtractFeeFromOutputs' option to 'fundrawtransaction'. (Chris Moore)
| * Add 'subtractFeeFromOutputs' option to 'fundrawtransaction'.Chris Moore2016-12-131-3/+7
| |
* | test: Add test for RPC named argumentsWladimir J. van der Laan2017-01-051-0/+12
| | | | | | | | Add RPC testcase for RPC named arguments.
* | authproxy: Add support for RPC named argumentsWladimir J. van der Laan2017-01-051-2/+4
|/
* [qa] pruning: Use cached utxo set to run fasterMarcoFalke2016-12-041-5/+9
|
* Merge #9221: [qa] Get rid of duplicate codeMarcoFalke2016-12-021-5/+13
|\ | | | | | | facbfa5 [qa] Get rid of duplicate code (MarcoFalke)
| * [qa] Get rid of duplicate codeMarcoFalke2016-12-021-5/+13
| |
* | [qa] Dump debug logs on travis failures.Suhas Daftuar2016-11-301-1/+10
| |
* | Fix some typosfsb40002016-11-281-3/+3
|/
* Merge #9139: Change sync_blocks to pick smarter maxheight (on top of #9196)MarcoFalke2016-11-231-6/+8
|\ | | | | | | 1126c85 [qa] Change sync_blocks to pick smarter maxheight (Russell Yanofsky)
| * [qa] Change sync_blocks to pick smarter maxheightRussell Yanofsky2016-11-111-6/+8
| | | | | | | | | | | | | | Instead of syncing to max height returned by the waitforblockheight RPC, sync to the max height returned by the getblockcount RPC. This change was suggested by Suhas Daftuar <[email protected]>.
* | Make test constant consistent with consensus.hBtcDrak2016-11-211-1/+1
| |
* | Merge #8872: Remove block-request logic from INV message processingWladimir J. van der Laan2016-11-211-2/+17
|\ \ | | | | | | | | | | | | | | | 037159c Remove block-request logic from INV message processing (Matt Corallo) 3451203 [qa] Respond to getheaders and do not assume a getdata on inv (Matt Corallo) d768f15 [qa] Make comptool push blocks instead of relying on inv-fetch (mrbandrews)
| * | [qa] Make comptool push blocks instead of relying on inv-fetchmrbandrews2016-11-071-2/+17
| | |
* | | [qa] add assert_raises_message to check specific error messagemrbandrews2016-11-151-2/+6
| |/ |/|
* | [qa] Avoid 2 list comprehensions in sync_blocksRussell Yanofsky2016-11-141-2/+2
| |
* | [qa] Fix sync_blocks timeout argumentRussell Yanofsky2016-11-141-3/+8
| | | | | | | | | | | | | | | | | | Motivation for this change is mainly to make sync_blocks behavior easier to understand. Behavior is unchanged in the normal case when there are only 2 nodes in the rpc_connections set. When there are more than 2 nodes, the previous "timeout -= wait" statement wouldn't take into account time spent waiting for all nodes and as a result could lead to blocking for longer than the requested timeout.
* | [qa] Improve sync_blocks error messages.Russell Yanofsky2016-11-141-2/+4
| |
* | Merge #9097: [qa] Rework sync_* and preciousblock.pyMarcoFalke2016-11-101-15/+17
|\ \ | | | | | | | | | | | | fa97ccb [qa] util: Rework sync_*() (MarcoFalke) fac1141 [qa] preciousblock: Use assert_equal and BitcoinTestFramework.__init__ (MarcoFalke)
| * | [qa] util: Rework sync_*()MarcoFalke2016-11-071-15/+17
| |/ | | | | | | | | | | * Only allow named args in sync_*() * Make sync_* fails more verbose * Add timeout to sync_chain()
* | Merge #8894: [Testing] Include fRelay in mininode version messagesWladimir J. van der Laan2016-11-091-6/+20
|\ \ | | | | | | | | | e5d682f Fix mininode version message format (jnewbery)
| * | Fix mininode version message formatjnewbery2016-11-091-6/+20
| | |
* | | [qa] test_framework: Exit when tmpdir existsMarcoFalke2016-11-071-6/+1
| |/ |/|
* | Merge #9077: [qa] Increase wallet-dump RPC timeoutMarcoFalke2016-11-072-3/+12
|\ \ | | | | | | | | | | | | e89614b [qa] Add more helpful RPC timeout message (Russell Yanofsky) 8463aaa [qa] Increase wallet-dump RPC timeout (Russell Yanofsky)
| * | [qa] Add more helpful RPC timeout messageRussell Yanofsky2016-11-071-1/+10
| | | | | | | | | | | | Replace previous timeout('timed out',) exception with more detailed error.
| * | [qa] Increase wallet-dump RPC timeoutRussell Yanofsky2016-11-071-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Increase wallet-dump RPC timeout from 30 seconds to 1 minute. This avoids a timeout error that seemed to happen regularly (around 50% of builds) on a particular jenkins server during the first getnewaddress RPC call made by the test. The failing stack trace looked like: Unexpected exception caught during testing: timeout('timed out',) File ".../bitcoin/qa/rpc-tests/test_framework/test_framework.py", line 146, in main self.run_test() File ".../bitcoin/qa/rpc-tests/wallet-dump.py", line 73, in run_test addr = self.nodes[0].getnewaddress() File ".../bitcoin/qa/rpc-tests/test_framework/coverage.py", line 49, in __call__ return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs) File ".../bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 145, in __call__ response = self._request('POST', self.__url.path, postdata.encode('utf-8')) File ".../bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 121, in _request return self._get_response() File ".../bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 160, in _get_response http_response = self.__conn.getresponse() File "/usr/lib/python3.4/http/client.py", line 1171, in getresponse response.begin() File "/usr/lib/python3.4/http/client.py", line 351, in begin version, status, reason = self._read_status() File "/usr/lib/python3.4/http/client.py", line 313, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/lib/python3.4/socket.py", line 374, in readinto return self._sock.recv_into(b)
* / [copyright] copyright header style uniformisle29832016-11-061-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | Three categories of modifications: 1) 1 instance of 'The Bitcoin Core developers \n', 1 instance of 'the Bitcoin Core developers\n', 3 instances of 'Bitcoin Core Developers\n', and 12 instances of 'The Bitcoin developers\n' are made uniform with the 443 instances of 'The Bitcoin Core developers\n' 2) 3 instances of 'BitPay, Inc\.\n' are made uniform with the other 6 instances of 'BitPay Inc\.\n' 3) 4 instances where there was no '(c)' between the 'Copyright' and the year where it deviates from the style of the local directory.
* Merge #6996: Add preciousblock RPCWladimir J. van der Laan2016-10-181-0/+10
|\ | | | | | | | | 5805ac8 Add preciousblock tests (Pieter Wuille) 5127c4f Add preciousblock RPC (Pieter Wuille)
| * Add preciousblock testsPieter Wuille2016-08-261-0/+10
| | | | | | | | Rebased, improved and extended by Luke-Jr.
* | test segwit uncompressed key fixesJohnson Lau2016-10-171-0/+74
| |