aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2019-06-26Add comments to Python ECDSA implementationJohn Newbery
Github-Pull: #15826 Rebased-From: b67978529ad02fc2665f2362418dc53db2e25e17
2019-06-21Make and get the multisig redeemscript and destination in one function ↵Andrew Chow
instead of two Instead of creating a redeemScript with CreateMultisigRedeemscript and then getting the destination with AddAndGetDestinationForScript, do both in the same function. CreateMultisigRedeemscript is changed to AddAndGetMultisigDestination. It creates the redeemScript and returns it via an output parameter. Then it calls AddAndGetDestinationForScript to add the destination to the keystore and get the proper destination. This allows us to inspect the public keys in the redeemScript before creating the destination so that the correct destination is used when uncompressed pubkeys are in the multisig. Github-Pull: #16026 Rebased-From: a49503402b6bc21e3878e151c07529941d36aed0
2019-06-21Pure python ECPieter Wuille
This removes the dependency on OpenSSL for the interaction tests, by providing a pure-Python toy implementation of secp256k1. Github-Pull: #15826 Rebased-From: 8c7b9324ca3f3ffb178bea56a96ea23f7e0383cb
2019-06-21test: Add test that addmultisigaddress fails for watchonly addressesMarcoFalke
Github-Pull: #15831 Rebased-From: fab6a0a659bb856e4598af3e0679fc37d5239478
2019-06-21test: Fixup creatmultisig documentation and whitespaceMarcoFalke
Github-Pull: #15831 Rebased-From: fad81d870aa6dd25d4fab5faad4c956ba364734a
2019-06-18Replace remaining fprintf with tfm::format manuallyMarcoFalke
Github-Pull: #16205 Rebased-From: fa8f195195945ce6258199af0461e3fbfbc1236d
2019-06-18rpc: bugfix: Properly use iswitness in converttopsbtMarcoFalke
Also explain the param in all RPCs Github-Pull: #15899 Rebased-From: fa499b5f027f77c0bf13699852c8c06f78e27bef
2019-06-18Bugfix: test/functional/rpc_psbt: Correct test description commentLuke Dashjr
Github-Pull: #14818 Rebased-From: c87fc71f7e9316bcc0653cd86c50177424b5b1f9
2019-06-18Bugfix: test/functional/rpc_psbt: Remove check for specific error message ↵Luke Dashjr
that depends on uncertain assumptions When converttopsbt is called with a signed transaction, it either fails with "TX decode failed" if one or more inputs were segwit, or "Inputs must not have scriptSigs and scriptWitnesses" otherwise. Since no effort is made by the test to ensure the inputs are segwit or not, avoid checking the exact message used. The error code is still checked to ensure it is of the correct kind of failure. Github-Pull: #14818 Rebased-From: 097c4aa379f255639ce0084702693fa72a595d6b
2019-06-14fixup: Fix prunning testJoão Barbosa
Github-Pull: #15991 Rebased-From: f402012ccfc596d7d94851dabbf386c278ff5335
2019-05-20Disallow extended encoding for non-witness transactions (take 3)MarcoFalke
Github-Pull: #16021 Rebased-From: fa2b52af32f6a4b9c22c270f36e92960c29ef364
2019-05-20Add test for superfluous witness record in deserializationGregory Sanders
Github-Pull: #15893 Rebased-From: cc556e4a30b4a32eab6722f590489d89b2875de3
2019-05-20Fix missing input template by making minimal txGregory Sanders
Github-Pull: #15893 Rebased-From: 25b078658139c1aea58393a32ac5a79144d8d140
2019-05-16test: Add test for p2p_blocksonlyMarcoFalke
Github-Pull: #15990 Rebased-From: fa320de79faaca2b088fcbe7f76701faa9bff236
2019-05-16test: Format predicate source as multiline on errorMarcoFalke
Github-Pull: #15990 Rebased-From: fa3872e7b4540857261aed948b94b6b2bfdbc3d1
2019-04-16Take non-importing keys into account for spendability warning in descriptor ↵Pieter Wuille
import Github-Pull: #15749 Rebased-From: b5d39877242504160a7f2c24c60c07a845d7a064
2019-04-01qa: Check unconfirmed balance after loadwalletJoão Barbosa
Github-Pull: #15652 Rebased-From: 4bf1b1cefa9723bf2cfa8b1a938757abc99bb17b
2019-04-01[tests] Add test for wallet rebroadcastsJohn Newbery
The existing wallet_resendwallettransactions.py test only tests the resendwallettransactions RPC. It does not test whether transactions are actually rebroadcast, or whether the rebroadcast logic is called on a timer. This commit updates the test to not use the resendwallettransactions RPC and test that transactions are rebroadcast on a timer. Github-Pull: #15646 Rebased-From: 529c1ae4a04248a46a8b4a5a63ecbb12a63ff50e
2019-03-13rpc: return a number for estimated_feerate in analyzepsbtfanquake
Github-Pull: #15559 Rebased-From: 335931df4a37467299a2ee0ba521ecd5c4e6d39e Tree-SHA512: ebe460e935e33fbbbe725db403654ee65c86a606401e8519e1180551e2ccd43661eb4ad20bf065f2c0c2a8026c3bb3bce796789f8d612e9e197ceb8d541a63a9
2019-03-01Merge #15485: add rpc_misc.py, mv test getmemoryinfo, add test mallocinfoMarcoFalke
f13ad1cae0 modify test for memory locked in case locking pages failed at some point (Adam Jonas) 2fa85ebd1c add rpc_misc.py, mv test getmemoryinfo, add test mallocinfo (Adam Jonas) Pull request description: Creating the `rpc_misc.py` functional test file to add space for adding tests to a file that doesn't have a lot of coverage. - Removing the `getmemoryinfo()` smoke test from wallet basic rather than moving it to keep the wallet decoupled. Feel like testing for reasonable memory allocation values should suffice. - Adding coverage for `mallocinfo()`. Introduced standard lib XML parser since the function exports an XML string that describes the current state of the memory-allocation implementation in the caller. Tree-SHA512: ced30115622916c88d1e729969ee331272ec9f2881eb36dee4bb7331bf633a6810a57fed63a0cfaf86de698edb5162e6a035efd07c89ece1df56b69d61288072
2019-03-01modify test for memory locked in case locking pages failed at some pointAdam Jonas
2019-03-01Merge #15497: rpc: Consistent range arguments in ↵MarcoFalke
scantxoutset/importmulti/deriveaddresses ca253f6ebf Make deriveaddresses use stop/[start,stop] notation for ranges (Pieter Wuille) 1675b7ce55 Use stop/[start,stop] notation in importmulti desc range (Pieter Wuille) 4566011631 Add support for stop/[start,stop] ranges to scantxoutset (Pieter Wuille) 6b9f45e81b Support ranges arguments in RPC help (Pieter Wuille) 7aa6a8aefb Add ParseRange function to parse args of the form int/[int,int] (Pieter Wuille) Pull request description: This introduces a consistent notation for RPC arguments in `scantxoutset`, `importmulti`, and `deriveaddresses`, either: * `"range" : int` to just specify the end of the range * `"range" : [int,int]` to specify both the begin and the end of the range. For `scantxoutset`, this is a backward compatible new feature. For the two other RPCs, it's an incompatible change, but neither of them has been in a release so far. Because of that non-released reason, this only makes sense in 0.18, in my opinion. I suggest this as an alternative to #15496, which only makes `deriveaddresses` compatible with `importmulti`, but not with the existing `scantxoutset` RPC. I also think `[int,int]` is more convenient than `{"start":int,"stop":int}`. I realize this is technically a feature added to `scantxoutset` after the feature freeze. If desired, I'll drop the `scantxoutset` changes. Tree-SHA512: 1cbebb90cf34f106786dbcec7afbf3f43fb8b7e46cc7e6763faf1bc1babf12375a1b3c3cf86ee83c21ed2171d99b5a2f60331850bc613db25538c38b6a056676
2019-02-28Make deriveaddresses use stop/[start,stop] notation for rangesPieter Wuille
2019-02-28test: Bump timeout on tests that timeout on windowsMarcoFalke
2019-02-28Use stop/[start,stop] notation in importmulti desc rangePieter Wuille
2019-02-28Add support for stop/[start,stop] ranges to scantxoutsetPieter Wuille
2019-02-26add rpc_misc.py, mv test getmemoryinfo, add test mallocinfoAdam Jonas
2019-02-26Merge #15471: rpc/gui: Remove 'Unknown block versions being mined' warningMarcoFalke
ef362f2773 rpc/gui: Remove 'Unknown block versions being mined' warning (Wladimir J. van der Laan) Pull request description: Due to miners inserting garbage into the version numbers causing false positives, the current version signalling has become completely useless. This removes the "unknown block versions" warning which has the tendency to scare users unnecessarily (and might get them to "update" to something bad). It preserves the warning in the logs. Whether this is desirable can be a point of discussion. Tree-SHA512: 51407ccd24a571462465d9c7180f0f28307c50b82a03284abe783e181d8ab7e0638dbb710698d883f28de8a609db70763e39be2470d956e67c833da0768e43e9
2019-02-25Merge #15419: qa: Always refresh cache to be out of ibdMarcoFalke
fa2cdc9ac2 test: Simplify create_cache (MarcoFalke) fa25210d62 qa: Fix wallet_txn_doublespend issue (MarcoFalke) 1111aecbb5 qa: Always refresh stale cache to be out of ibd (MarcoFalke) fab0d85802 qa: Remove mocktime unless required (MarcoFalke) Pull request description: When starting a test, we are always in IBD because the timestamps on cached blocks are in the past. Usually, we solve that by generating a block at the beginning of the test. That is clumsy and might even lead to other problems such as #15360 and https://github.com/bitcoin/bitcoin/issues/14446#issuecomment-461926598 So fix that by getting rid of mocktime and always refreshing the last block of the cache when starting the test framework. Should fix #14446 Tree-SHA512: 6af09800f9c86131349a103af617a54551f5f3f3260d38e14e3f30fdd3d91a0feb0100c56cbb12eae4aeac5571ae4b530b16345cbb831d2670237b53351a22c1
2019-02-25test: Simplify create_cacheMarcoFalke
2019-02-25rpc/gui: Remove 'Unknown block versions being mined' warningWladimir J. van der Laan
Due to miners inserting garbage into the version numbers, the current version signalling has become completely useless. This removes the "unknown block versions" warning which has the tendency to scare users unnecessarily (and might get them to "update" to something bad). It preserves the warning in the logs. Whether this is desirable can be a point of discussion.
2019-02-25Merge #15401: rpc: Actually throw help when passed invalid number of paramsWladimir J. van der Laan
fa4ce7038d444defe0b98a30097174c278054a33 rpc: Actually throw help when passed invalid number of params (MarcoFalke) fa05626ca7a0fe896ac554c79eaea4c36acdf861 rpc: Add RPCHelpMan::IsValidNumArgs() (MarcoFalke) Pull request description: Can be tested by * running the included test against an old binary (compiled without this patch) * calling `setban 1 "add" 3 4 5 6 7 8 9 0` in the gui Tree-SHA512: aa6a25bbe6f40722913ea292252a62a4012c964eed9f4035335a2e2d13be98eb60f368e8a3251a104a26a62c08b2cb926b06e5ab1418ef1cf4abdd71d87c2919
2019-02-21Merge #15278: Improve PID file error handlingWladimir J. van der Laan
3782075a5fd4ad0c15a6119e8cdaf136898f679e Move all PID file stuff to init.cpp (Hennadii Stepanov) 561e375c73a37934fe77a519762d81edf7a3325c Make PID file creating errors fatal (Hennadii Stepanov) 745a2ace18ce857bc712d7e66c8bad7c082c07e2 Improve PID file removing errors logging (Hennadii Stepanov) Pull request description: Digging into #15240 the lack of the proper logging has been discovered. Fixed by this PR. UPDATE (inspired by @laanwj's [comment](https://github.com/bitcoin/bitcoin/pull/15278#discussion_r252641810)): Not being able to create the PID file is fatal now. Output of `bitcoind`: ``` $ src/bitcoind -pid=/run/bitcoind/bitcoind.pid 2019-02-01T23:20:10Z Bitcoin Core version v0.17.99.0-561e375c7 (release build) 2019-02-01T23:20:10Z Assuming ancestors of block 0000000000000037a8cd3e06cd5edbfe9dd1dbcc5dacab279376ef7cfc2b4c75 have valid signatures. 2019-02-01T23:20:10Z Setting nMinimumChainWork=00000000000000000000000000000000000000000000007dbe94253893cbd463 2019-02-01T23:20:10Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation 2019-02-01T23:20:10Z Using RdRand as an additional entropy source 2019-02-01T23:20:11Z Error: Unable to create the PID file '/run/bitcoind/bitcoind.pid': No such file or directory Error: Unable to create the PID file '/run/bitcoind/bitcoind.pid': No such file or directory 2019-02-01T23:20:11Z Shutdown: In progress... 2019-02-01T23:20:11Z Shutdown: Unable to remove PID file: File does not exist 2019-02-01T23:20:11Z Shutdown: done ``` Output of `bitcoin-qt`: ![screenshot from 2019-02-02 01-19-05](https://user-images.githubusercontent.com/32963518/52154886-9349b600-2688-11e9-8128-470f16790305.png) **Notes for reviewers** 1. `CreatePidFile()` has been moved from `util/system.cpp` to `init.cpp` for the following reasons: - to get the ability to use `InitError()` - now `init.cpp` contains code of both creating PID file and removing it 2. Regarding 0.18 release process: this PR modifies 1 string and introduces 2 new ones. Tree-SHA512: ac07d0f800e61ec759e427d0afc0ca43d67f232e977662253963afdd0a220d34b871050f58149fc9fabd427bfc8e0d3f6a6032f2a38f30ad366fc0d074b0f2b3
2019-02-20rpc: Actually throw help when passed invalid number of paramsMarcoFalke
2019-02-20Merge #15439: tests: remove byte.hex() to keep compatibilityMarcoFalke
1a062b85f0 tests: remove byte.hex() to keep compatibility (Akio Nakamura) Pull request description: Use ```test_framework.util.bytes_to_hex_str()``` instead of ```bytes.hex()``` that new in Python 3.5 to support minimum version of Python(test). ```test/functional/test_framework/wallet_util.py``` is also reported to have '\.hex()' in #15397, but it does not matter because it calls CScript.hex() defined in wallet_util.py. Tree-SHA512: 1019212e965f0848d235fab4da11959dffa42e8adfcd41216c10795cfc63c804b5deb5a3317f25d29940b9dcf088ab76fe3fa80d2679dc19f5f482dc5bde3283
2019-02-19qa: Fix wallet_txn_doublespend issueMarcoFalke
2019-02-19qa: Always refresh stale cache to be out of ibdMarcoFalke
2019-02-19qa: Remove mocktime unless requiredMarcoFalke
2019-02-19Merge #15404: [test] Remove -txindex to start nodesWladimir J. van der Laan
8e4b4f683a0b342cec24cd51b1e98433034ea2ea Address test todos by removing -txindex to nodes. Originally added when updating getrawtransaction to stop searching unspent utxos. (Amiti Uttarwar) Pull request description: Original todos added when removing getrawtransaction default behavior of searching unspent utxos. Tree-SHA512: d080953c3b0d2e5dca2265a15966dc25985a614c9cc86271ecd6276178ce428c85e262c24df92501695c32fed7beec0339b989f03cce91b57fb2efba201b7809
2019-02-19Merge #15415: [test] functional: allow custom cwd, use tmpdir as defaultMarcoFalke
e3e1a5631e [test] functional: set cwd of nodes to tmpdir (Sjors Provoost) Pull request description: Any process launched by bitcoind will have `self.datadir` as its `cwd`. Tree-SHA512: 0b311643bb96c7dc2f693774620173243b3add40bf373284695af2f0071823b23485289fd2ffe152b7f63e0bfe989b16720077cfc2ce33905f9b8e7f2630f3c0
2019-02-19[test] functional: set cwd of nodes to tmpdirSjors Provoost
2019-02-19tests: remove byte.hex() to keep compatibilityAkio Nakamura
Use test_framework.util.bytes_to_hex_str() instead of bytes.hex() that new in Python 3.5, to support minimum version of Python(test).
2019-02-18Merge #15397: Remove manual byte editing in wallet_tx_clone func testMarcoFalke
6aaa0abc12 Remove manual byte editing in wallet_tx_clone func test (Gregory Sanders) Pull request description: Adapted from @stevenroose Tree-SHA512: 87f251579e347f870bd30fc57b0c130f00914a3dc78799826384eb049b91d49f2525d55899bf525997e23cc976ca7d10e6b56b23f7358acec307368d48a6f6f1
2019-02-17Address test todos by removing -txindex to nodes.Amiti Uttarwar
Originally added when updating getrawtransaction to stop searching unspent utxos.
2019-02-16Merge #15368: Descriptor checksumsWladimir J. van der Laan
fd637be8d21a606e98c037b40b268c4a1fae2244 Add checksums to descriptors.md (Pieter Wuille) be62903c417293f6217e124669e62fd2172a18f1 Make descriptor checksums mandatory in deriveaddresses and importmulti (Pieter Wuille) b52cb6368869c9f6dd2cd8f309b3000de514d439 Add getdescriptorinfo to compute checksum (Pieter Wuille) 3b40bff9880e9ae2817136b7d14989afccfc1937 Descriptor checksum (Pieter Wuille) Pull request description: This adds support for a descriptor-specific 8-character checksum. Descriptors may optionally be suffixed with a `#` plus these 8 checksum characters. Any descriptor that contains a `#` at the end must be followed by a valid checksum. If the `#` is missing entirely, it is valid without checksum. All RPCs are updated to report descriptors that include the checksum. On input, they are optional except in `deriveaddress` and `importmulti`, which require descriptors which include a checksum. A new RPC is also added to analyse descriptors (`getdescriptorinfo`), which can be used to compute the checksum for a descriptor without. Tree-SHA512: a8294b09155eb6c67fbc178b5e2d3fbc0e9bec8b6de57a13f8835550d51c2cb32a428b3c9a188ded42b454d594e9305edbd4797906b755de77a8f33c79165f6b
2019-02-16Merge #13932: Additional utility RPCs for PSBTWladimir J. van der Laan
540729ef4bf1b6c6da1ec795e441d2ce56a9a58b Implement analyzepsbt RPC and tests (Andrew Chow) 77542cf2a5f8abb97dd46f782c1b0199cc062033 Move PSBT UTXO fetching to a separate method (Andrew Chow) cb40b3abd4514361a024a1e7a1a281da9261261b Figure out what is missing during signing (Andrew Chow) 08f749c9147a5f3fdbbd880e0974b97084429002 Implement joinpsbts RPC and tests (Andrew Chow) 7344a7b9984b99882e136efc8ad48fb31740df93 Implement utxoupdatepsbt RPC and tests (Andrew Chow) Pull request description: This PR adds 3 new utility RPCs for interacting with PSBTs. `utxoupdatepsbt` updates a PSBT with UTXO information from the node. It only works with witness UTXOs because full transactions (as would be needed for non-witness UTXOs) are not available unless txindex is enabled. `joinpsbts` joins the inputs from multiple distinct PSBTs into one PSBT. e.g. if PSBT 1 has inputs 1 and 2, and PSBT 2 has inputs 3 and 4, `joinpsbts` would create a new PSBT with inputs 1, 2, 3, and 4. `analyzepsbt` analyzes a PSBT and determines the current state of it and all of its inputs, and the next step that needs to be done. Tree-SHA512: 3c1fa302201abca76a8901d0c2be7b4ccbce334d989533c215f8b3e50e22f2f018ce6209544b26789f58f5980a253c0655111e1e20d47d5656e0414c64891a5c
2019-02-16Implement analyzepsbt RPC and testsAndrew Chow
2019-02-15Make descriptor checksums mandatory in deriveaddresses and importmultiPieter Wuille
2019-02-15Add getdescriptorinfo to compute checksumPieter Wuille
2019-02-15Descriptor checksumPieter Wuille