aboutsummaryrefslogtreecommitdiff
path: root/test/functional/interface_rest.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge AuxPoW support from NamecoreRoss Nicoll2019-07-131-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Run all tests even if wallet is not compiledMarcoFalke2018-10-241-0/+3
| | | | | Github-Pull: #14180 Rebased-From: fac95398366f644911b58f1605e6bc37fb76782d
* Update copyright headers to 2018DrahtBot2018-07-271-1/+1
|
* Minor Python cleanups to make flake8 pass with the new rules enabledpracticalswift2018-04-161-2/+2
|
* [tests] simplify binary and hex response parsing in interface_rest.pyRoman Zeyde2018-04-031-18/+16
| | | | | We use assert_greater_than_or_equal(), since the hex response contains an extra b'\n' traling byte.
* [tests] only use 2 nodes in interface_rest.pyJohn Newbery2018-04-031-13/+11
|
* [tests] refactor interface_rest.py to avoid code repetitionJohn Newbery2018-04-031-125/+92
| | | | Also refactor txout index parsing and formatting.
* [tests] Make json request building more consistent in interface_rest.pyJohn Newbery2018-04-031-49/+43
|
* [tests] improve logging and documentation in interface_rest.pyJohn Newbery2018-04-031-29/+31
|
* [tests] fix flake8 warnings in interface_rest.py testJohn Newbery2018-04-031-129/+116
|
* [REST] Handle UTXO retrieval when ignoring the mempoolRoman Zeyde2018-03-251-7/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current REST API always returns empty UTXO when invoked without `/checkmempool/` URL part. After the fix: ``` $ curl -s http://localhost:8332/rest/getutxos/0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098-0.json | jq { "chainHeight": 514109, "chaintipHash": "0000000000000000001fe76d1445e8a6432fd2de04261dc9c5915311dc7ad6de", "bitmap": "1", "utxos": [ { "height": 1, "value": 50, "scriptPubKey": { "asm": "0496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858ee OP_CHECKSIG", "hex": "410496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858eeac", "reqSigs": 1, "type": "pubkey", "addresses": [ "12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX" ] } } ] } ``` Before the fix: ``` $ curl -s http://localhost:8332/rest/getutxos/0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098-0.json | jq { "chainHeight": 514109, "chaintipHash": "0000000000000000001fe76d1445e8a6432fd2de04261dc9c5915311dc7ad6de", "bitmap": "0", "utxos": [] } ```
* Fix typosDimitris Apostolou2018-03-211-1/+1
|
* Merge #12479: RPC: Add child transactions to getrawmempool verbose outputWladimir J. van der Laan2018-03-061-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1dfb4e7d7 [Tests] Check output of parent/child tx list from getrawmempool, getmempooldescendants, getmempoolancestors, and REST interface (Conor Scott) fc44cb108 [RPC] Add list of child transactions to verbose output of getrawmempool (Conor Scott) Pull request description: `bitcoin-cli getrawmempool true` only lists a transaction's parents in the `depends` field. This change adds a `spentby` field to the json response, which lists the transaction's children in the mempool. Currently the only way to find child transactions is to use `getrawmempool` or make another call to `getmempooldescendants` and search the response for transactions that list the parent_txid in the `depends` list, which is inefficient. This change allows direct lookup of children. Example Output ``` "9a9b5733c0d89f207908cfa3fe17809bee71f629aa095c9f8754524e29e98ba4": { ...other geterawmempool data... "wtxid": "9a9b5733c0d89f207908cfa3fe17809bee71f629aa095c9f8754524e29e98ba4", "depends": [ "bdd92851d5766a42aeb62af667bb422a116cab4e032bba5e3dd6efe5b4b40aa0" ], "spentby": [ "dc5d3ec388a9121421208738a041ac30a22163bc2e17758f2275b6c51a15ba7b" ] }, ``` Tree-SHA512: 83da7d421c9799a40ef65af3b7fdb586d6d87385f3f2ede3afd2c311725444b858f9d91cc110422a0fa31905779934fee07211ca6fe6b746792b83692c94b3ce
| * [Tests] Check output of parent/child tx list from getrawmempool, ↵Conor Scott2018-02-251-1/+3
| | | | | | | | getmempooldescendants, getmempoolancestors, and REST interface
* | qa: Move common args to bitcoin.confMarcoFalke2018-02-151-0/+1
|/
* [tests] Rename misc functional tests.Anthony Towns2018-01-251-0/+326