aboutsummaryrefslogtreecommitdiff
path: root/test/functional
AgeCommit message (Collapse)Author
2018-07-24Merge #12257: [wallet] Use destination groups instead of coins in coin selectWladimir J. van der Laan
232f96f5c8a3920c09db92f4dbac2ad7d10ce8cf doc: Add release notes for -avoidpartialspends (Karl-Johan Alm) e00b4699cc6d2ee5697d38dd6607eb2631c9b77a clean-up: Remove no longer used ivars from CInputCoin (Karl-Johan Alm) 43e04d13b1ffc02b1082176e87f420198b40c7b1 wallet: Remove deprecated OutputEligibleForSpending (Karl-Johan Alm) 0128121101fb3ee82f3abd3973a967a4226ffe0e test: Add basic testing for wallet groups (Karl-Johan Alm) 59d6f7b4e2f847ec1f2ff46c84e6157655984f85 wallet: Switch to using output groups instead of coins in coin selection (Karl-Johan Alm) 87ebce25d66952f5ce565bb5130dcf5e24049872 wallet: Add output grouping (Karl-Johan Alm) bb629cb9dc567cc819724d9f4852652926e60cbf Add -avoidpartialspends and m_avoid_partial_spends (Karl-Johan Alm) 65b3eda458221644616d0fdd6ba0fe01bdbce893 wallet: Add input bytes to CInputCoin (Karl-Johan Alm) a443d7a0ca333b0bae63e04b5d476f9ad9c7aeac moveonly: CoinElegibilityFilter into coinselection.h (Karl-Johan Alm) 173e18a289088c6087ba6fac708e322aa63b7a94 utils: Add insert() convenience templates (Karl-Johan Alm) Pull request description: This PR adds an optional (off by default) `-avoidpartialspends` flag, which changes coin select to use output groups rather than outputs, where each output group corresponds to all outputs with the same destination. It is a privacy improvement, as each time you spend some output, any other output that is publicly associated with the destination (address) will also be spent at the same time, at the cost of fee increase for cases where coin select without group restriction would find a more optimal set of coins (see example below). For regular use without address reuse, this PR should have no effect on the user experience whatsoever; it only affects users who, for some reason, have multiple outputs with the same destination (i.e. address reuse). Nodes with this turned off will still try to avoid partial spending, if the fee of the resulting transaction is not greater than the fee of the original transaction. Example: a node has four outputs linked to two addresses `A` and `B`: * 1.0 btc to `A` * 0.5 btc to `A` * 1.0 btc to `B` * 0.5 btc to `B` The node sends 0.2 btc to `C`. Without `-avoidpartialspends`, the following coin selection will occur: * 0.5 btc to `A` or `B` is picked * 0.2 btc is output to `C` * 0.3 - fee is output to (unique change address) With `-avoidpartialspends`, the following will instead happen: * Both of (0.5, 1.0) btc to `A` or `B` is picked (one or the other pair) * 0.2 btc is output to `C` * 1.3 - fee is output to (unique change address) As noted, the pro here is that, assuming nobody sends to the address after you spend from it, you will only ever use one address once. The con is that the transaction becomes slightly larger in this case, because it is overpicking outputs to adhere to the no partial spending rule. This complements #10386, in particular it addresses @luke-jr and @gmaxwell's concerns in https://github.com/bitcoin/bitcoin/pull/10386#issuecomment-300667926 and https://github.com/bitcoin/bitcoin/pull/10386#issuecomment-302361381. Together with `-avoidreuse`, this fully addresses the concerns in #10065 I believe. Tree-SHA512: 24687a4490ba59cf4198ed90052944ff4996653a4257833bb52ed24d058b3e924800c9b3790aeb6be6385b653b49e304453e5d7ff960e64c682fc23bfc447621
2018-07-24test: Add basic testing for wallet groupsKarl-Johan Alm
2018-07-23Skip is_closing() check when not available.Daniel Kraft
https://github.com/bitcoin/bitcoin/pull/13715 introduced a new check for _transport.is_closing() in mininode's P2PConnection's. This function is only available from Python 3.4.4, though, while Bitcoin is supposed to support all Python 3.4 versions. In this change, we make the check conditional on is_closing() being available. If it is not, then we revert to the behaviour before the check was introduced; this means that https://github.com/bitcoin/bitcoin/issues/13579 is not fixed for old systems, but at least the tests work as they used to do before. This includes a small refactoring from a one-line lambda to an inline function, because this makes the code easier to read with more and more conditions being added. Fixes https://github.com/bitcoin/bitcoin/issues/13745.
2018-07-20Fix bitcoin-cli --versionBen Woosley
By declaring the relevant option. Note contrib/devtools/gen-manpages.sh relies on this version information.
2018-07-20Merge #11637: p2p: Remove dead service bits codeWladimir J. van der Laan
fa4bf92be9420919c74cdde9a973f7327d01ac88 Remove dead service bits code (MarcoFalke) Pull request description: Seems fine to remove for the upcoming 0.17 release Fixes #10993 Tree-SHA512: 3a4664b787e3da399bcaaba693619bd384826df14f469dbdfbbfffc540d9da3f2b322cda262b43388376785f77907c2540541c239ab0fca82bd7eb69d02b6b7a
2018-07-20Merge #13718: docs: Specify preferred Python string formatting techniqueMarcoFalke
b1b8863fd6 docs: Specify preferred Python string formatting technique (Mason Simon) Pull request description: @practicalswift this documents the nit you suggested in my previous PR https://github.com/bitcoin/bitcoin/pull/13707#discussion_r203628395 Tree-SHA512: b75335976b30ccbce5c2e3a46e5b6218e797944e7025c17b4e56f294670397d731e1a9f4fe7e809d907136e2e62cd9c2b8404b875b4879a1e3f0b1970b94d5a8
2018-07-20Merge #9662: Add createwallet "disableprivatekeys" option: a sane mode for ↵Wladimir J. van der Laan
watchonly-wallets a3fa4d6a6acf19d640a1d5879a00aa1f059e2380 QA: Fix bug in -usecli logic that converts booleans to non-lowercase strings (Jonas Schnelli) 4704e5f074e57782d058404a594a7313cf170cf0 [QA] add createwallet disableprivatekey test (Jonas Schnelli) c7b8f343e99d9d53ea353ddce9a977f1886caf30 [Qt] Disable creating receive addresses when private keys are disabled (Jonas Schnelli) 2f15c2bc20d583b4c1788da78c9c635c36e03ed0 Add disable privatekeys option to createwallet (Jonas Schnelli) cebefba0855cee7fbcb9474b34e6779369e8e9ce Add option to disable private keys during internal wallet creation (Jonas Schnelli) 9995a602a639b64a749545b7c3bafbf67f97324f Add facility to store wallet flags (64 bits) (Jonas Schnelli) Pull request description: This mode ('createwallet {"disableprivatekeys": true}') is intended for a sane pure watch-only mode, ideal for a use-case where one likes to use Bitcoin-Core in conjunction with a hardware-wallet or another solutions for cold-storage. Since we have support for custom change addresses in `fundrawtransaction`, pure watch-only wallets including coin-selection are possible and do make sense for some use cases. This new mode disables all forms of private key generation and ensure that no mix between hot and cold keys are possible. Tree-SHA512: 3ebe7e8d54c4d4e5f790c348d4c292d456f573960a5b04d69ca5ef43a9217c7e7671761c6968cdc56f9a8bc235f3badd358576651af9f10855a0eb731f3fc508
2018-07-19docs: Specify preferred Python string formatting techniqueMason Simon
2018-07-19tests: fixes mininode's P2PConnection sending messages on closing transportmarcoagner
- checks if _transport.is_closing() (added in python3.4.4/python3.5.1) before attempting to send messages on P2PConnection's send_message method.
2018-07-18Merge #13557: BIP 174 PSBT Serializations and RPCsWladimir J. van der Laan
020628e3a4e88e36647eaf92bac4b3552796ac6a Tests for PSBT (Andrew Chow) a4b06fb42eb0ad94e562ca839391b57e69285136 Create wallet RPCs for PSBT (Andrew Chow) c27fe419efb3b6588c400d764122ffb33375e028 Create utility RPCs for PSBT (Andrew Chow) 8b5ef2793748065727a9a2498805ae5b269dcb4f SignPSBTInput wrapper function (Andrew Chow) 58a8e28918025c28f19ba19cbaa4a72374162942 Refactor transaction creation and transaction funding logic (Andrew Chow) e9d86a43ad8b1ab83b324e9a7a64c43a61337501 Methods for interacting with PSBT structs (Andrew Chow) 12bcc64f277f642ece03c25653e726f2276f0d51 Add pubkeys and whether input was witness to SignatureData (Andrew Chow) 41c607f09badb2c3ed58ff6fb17a8ebbef2cdabd Implement PSBT Structures and un/serialization methods per BIP 174 (Andrew Chow) Pull request description: This Pull Request fully implements the [updated](https://github.com/bitcoin/bips/pull/694) BIP 174 specification. It is based upon #13425 which implements the majority of the signing logic. BIP 174 specifies a binary transaction format which contains the information necessary for a signer to produce signatures for the transaction and holds the signatures for an input while the input does not have a complete set of signatures. This PR contains structs for PSBT, serialization, and deserialzation code. Some changes to `SignatureData` have been made to support detection of UTXO type and storing public keys. *** Many RPCs have been added to handle PSBTs. `walletprocesspsbt` takes a PSBT format transaction, updates the PSBT with any inputs related to this wallet, signs, and finalizes the transaction. There is also an option to not sign and just update. `walletcreatefundedpsbt` creates a PSBT from user provided data in the same form as createrawtransaction. It also funds the transaction and takes an options argument in the same form as `fundrawtransaction`. The resulting PSBT is blank with no input or output data filled in. It is analogous to a combination of `createrawtransaction` and `fundrawtransaction` `decodepsbt` takes a PSBT and decodes it to JSON. It is analogous to `decoderawtransaction` `combinepsbt` takes multiple PSBTs for the same tx and combines them. It is analogous to `combinerawtransaction` `finalizepsbt` takes a PSBT and finalizes the inputs. If all inputs are final, it extracts the network serialized transaction and returns that instead of a PSBT unless instructed otherwise. `createpsbt` is like `createrawtransaction` but for PSBTs instead of raw transactions. `convertpsbt` takes a network serialized transaction and converts it into a psbt. The resulting psbt will lose all signature data and an explicit flag must be set to allow transactions with signature data to be converted. *** This supersedes #12136 Tree-SHA512: 1ac7a79e5bc669933f0a6fcc93ded55263fdde9e8c144a30266b13ef9f62aacf43edd4cbca1ffbe003090b067e9643c9298c79be69d7c1b10231b32acafb6338
2018-07-18Merge #13687: travis: Check that ~/.bitcoin is never createdWladimir J. van der Laan
fabe28a0cdcfa13e0e595a0905e3642a960d3077 qa: Temporarily disable test that reads the default datadir location (MarcoFalke) 41a8c8dfafeb02e7bd1b755a9673638e1eed238b travis: Check that ~/.bitcoin is never created (MarcoFalke) Pull request description: Tree-SHA512: d114db29a18f684d207caa0d7c947b13c945e2dd8b6d7fdeacdf7aa194f8123579d1139331b9d308df69a1132796e805a9ab63580aebde9b719860c0ff4b5652
2018-07-17qa: Temporarily disable test that reads the default datadir locationMarcoFalke
2018-07-17Merge #13638: tests: Use MAX_SCRIPT_ELEMENT_SIZE from script.pyWladimir J. van der Laan
b9f4b211df24fed85dddbe69355648b57fd331ac tests: Use MAX_SCRIPT_ELEMENT_SIZE from script.py (Daniel Kraft) Pull request description: `p2p_segwit.py` and `test_framework/script.py` both define a constant for `MAX_SCRIPT_ELEMENT_SIZE` (=520 bytes), which is redundant. This change uses the constant defined in the `script.py` module for `p2p_segwit.py`. Tree-SHA512: 2bc295ff26d9b052d4e05b85c27e748175884d6689a92c19337fc4db8bf439e3abe3edc91af1aaf46d8dc42ed96a85ad17110546d2274a0d9cda3abd6b878a31
2018-07-17Merge #12196: Add scantxoutset RPC methodWladimir J. van der Laan
be98b2d9a8fcb5f0e29ea88f026d604442fe984c [QA] Add scantxoutset test (Jonas Schnelli) eec7cf7b33cafac6a969bce38905cbacda56b1a5 scantxoutset: mention that scanning by address will miss P2PK txouts (Jonas Schnelli) 94d73d32abe927e74271a7b3eac7ba56658a535e scantxoutset: support legacy P2PK script type (Jonas Schnelli) 892de1dfea283a5d6ac18b8c74b57f61a920c762 scantxoutset: add support for scripts (Jonas Schnelli) 78304941f771b8bd918deddd37d01bc8f21873e1 Blockchain/RPC: Add scantxoutset method to scan UTXO set (Jonas Schnelli) 90485755115424ed9ea70206f54da2b13777fa6c Add FindScriptPubKey() to search the UTXO set (Jonas Schnelli) Pull request description: Alternative to #9152. This takes `<n>` pubkeys and optionally `<n>` xpubs (together with a definable lookup windows where the default is 0-1000) and looks up common scripts in the UTXO set of all given or derived keys. The output will be an array similar to `listunspent`. That array is compatible with `createrawtransaction` as well as with `signrawtransaction`. This makes it possible to prepare sweeps and have them signed in a secure (cold) space. Tree-SHA512: a2b22a117cf6e27febeb97e5d6fe30184926d50c0c7cbc77bb4121f490fed65560c52f8eac67a9720d7bf8f420efa42459768685c7e7cc03722859f51a5e1e3b
2018-07-16Tests for PSBTAndrew Chow
Added functional tests for PSBT that test the RPCs. Also added all of the BIP 174 test vectors (except for the updater tests) in the functional tests. Added a Unit test for the BIP 174 updater test vector.
2018-07-16Merge #13652: rpc: Fix that CWallet::AbandonTransaction would leave the ↵Wladimir J. van der Laan
grandchildren, etc. active 89e70f9d7fe384ef9de4fa3828d4c80523290186 Fix that CWallet::AbandonTransaction would only traverse one level (Ben Woosley) Pull request description: Prior to this change, it would mark only the first layer of child transactions abandoned, due to always following the input `hashTx` rather than the current `now` tx. Tree-SHA512: df068b49637d299ad73237c7244005fe5aa966d6beae57aff12e6948f173d9381e1b5d08533f7e3a1416991ed57f9f1f7b834057141d85c07dc60bb1f0872cea
2018-07-16Merge #13664: Trivial: fix references to share/rpcuser (now share/rpcauth)MarcoFalke
c64cc1bd94 scripted-diff: Fix references to share/rpcuser (now share/rpcauth) (Mason Simon) Pull request description: Commit 3fdb297 renamed share/rpcuser to share/rpcauth but left references to the old path in code; this commit fixes the old references. ``` -BEGIN VERIFY SCRIPT- git grep --files-with-matches 'share/rpcuser' src/*.cpp | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g' git grep --files-with-matches 'share/rpcuser' test/functional/*.py | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g' -END VERIFY SCRIPT- ``` Tree-SHA512: 0ae5c746cfbaf38683e636382a9d518bbce123d308b1c8d47c1b089cc2e64dd6a7098cdfb6606ed5a9abc867d948a14022c3f3065f64076086ded429a7fa3cc7
2018-07-15scripted-diff: Fix references to share/rpcuser (now share/rpcauth)Mason Simon
Commit 3fdb29778a0b598d4ddf05ec5ed4593641d0da6e renamed share/rpcuser to share/rpcauth but left references to the old path in code; this commit fixes the old references. Performed update using https://github.com/facebook/codemod with command: `codemod --extensions cpp,py,md 'share/rpcuser' 'share/rpcauth'` -BEGIN VERIFY SCRIPT- git grep --files-with-matches 'share/rpcuser' src/*.cpp | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g' git grep --files-with-matches 'share/rpcuser' test/functional/*.py | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g' -END VERIFY SCRIPT-
2018-07-15[QA] Add scantxoutset testJonas Schnelli
2018-07-14Merge #13138: [tests] Remove accounts from wallet_importprunedfunds.pyMarcoFalke
38040c34e1 [tests] Remove accounts from wallet_importprunedfunds.py (John Newbery) Pull request description: This was split from #13075 to not block review/merge of that PR. Tree-SHA512: 631d7139ed2bda5222ec395cc75720261e2e1f741dba04723d09fe04ef6cf92222a3679d886026ec33e2db2d1e2fa1a0f36c2451581d0f733a9939a98c7118ab
2018-07-13Merge #13072: Update createmultisig RPC to support segwitPieter Wuille
f40b3b82df [tests] functional test for createmultisig RPC (Anthony Towns) b9024fdda3 segwit support for createmultisig RPC (Anthony Towns) d58055d25f Move AddAndGetDestinationForScript from wallet to outputype module (Anthony Towns) 9a44db2e46 Add outputtype module (Anthony Towns) Pull request description: Adds an "address_type" parameter that accepts "legacy", "p2sh-segwit", and "bech32" to choose the type of address created. Defaults to "legacy" rather than the value of the `-address-type` option for backwards compatibility. As part of implementing this, OutputType is moved from wallet into its own module, and `AddAndGetDestinationForScript` is changed to apply to a `CKeyStore` rather than a wallet, and to invoke `keystore.AddCScript(script)` itself rather than expecting the caller to have done that. Fixes #12502 Tree-SHA512: a08c1cfa89976e4fd7d29caa90919ebd34a446354d17abb862e99f2ee60ed9bc19d8a21a18547c51dc3812cb9fbed86af0bef2f1e971f62bf95cade4a7d86237
2018-07-13Merge #13566: Fix get balancePieter Wuille
702ae1e21a [RPC] [wallet] allow getbalance to use min_conf and watch_only without accounts. (John Newbery) cf15761f6d [wallet] GetBalance can take a min_depth argument. (John Newbery) 0f3d6e9ab7 [wallet] factor out GetAvailableWatchOnlyBalance() (John Newbery) 7110c830f8 [wallet] deduplicate GetAvailableCredit logic (John Newbery) ef7bc8893c [wallet] Factor out GetWatchOnlyBalance() (John Newbery) 4279da4785 [wallet] GetBalance can take an isminefilter filter. (John Newbery) Pull request description: #12953 inadvertently removed the functionality to call `getbalance "*" <int> <bool>` to get the wallet's balance with either minconfs or include_watchonly. This restores that functionality (when `-deprecatedrpc=accounts`), and also makes it possible to call ``getbalance minconf=<int> include_watchonly=<bool>` when accounts are not being used. Tree-SHA512: 67e84de9291ed6d34b23c626f4dc5988ba0ae6c99708d02b87dd3aaad3f4b6baa6202a66cc2dadd30dd993a39de8036ee920fcaa8cbb1c5dfe606e6fac183344
2018-07-13Merge #13626: qa: Fix some TODOs in p2p_segwitMarcoFalke
eeeef80fb6 qa: Fix some TODOs in p2p_segwit (MarcoFalke) Pull request description: * I believe we don't need to redundantly test versionbits logic in every functional tests that tests a softfork deployment that is being done with versionbits. Thus, remove two `TODO`s that ask for that. * Replace another `TODO` with `wait_until`. * Some style fixups after #13467 Tree-SHA512: c7120404d50579d6f3b9092f1e259959190eeafe520231e3479c8c256a50bf7260ccc93f8301ac0e100c54037053f6849433ebb1c55607e01d94b9812e525083
2018-07-13qa: Fix some TODOs in p2p_segwitMarcoFalke
2018-07-13Fix that CWallet::AbandonTransaction would only traverse one levelBen Woosley
Prior to this change, it would mark only the first layer of child transactions abandoned, due to always following the input hashTx rather than the current now tx.
2018-07-12QA: Fix bug in -usecli logic that converts booleans to non-lowercase stringsJonas Schnelli
2018-07-12[QA] add createwallet disableprivatekey testJonas Schnelli
2018-07-12[tests] skip rpc_zmq functional test when python3 zmq lib is not presentJames O'Beirne
Also refactors zmq-related test skipping logic into distinct functions.
2018-07-11tests: Use MAX_SCRIPT_ELEMENT_SIZE from script.pyDaniel Kraft
p2p_segwit.py and test_framework/script.py both define a constant for MAX_SCRIPT_ELEMENT_SIZE (=520 bytes), which is redundant. This change uses the constant defined in the script.py module for p2p_segwit.py.
2018-07-11Remove dead service bits codeMarcoFalke
2018-07-10Merge #13547: Make signrawtransaction* give an error when amount is needed ↵Wladimir J. van der Laan
but missing 685d1d8115f61b15115d80523dd8273f0a816534 [tests] Check signrawtransaction* errors on missing prevtx info (Anthony Towns) a3b065b51fb333d976108a1fe34b7f663fd67285 Error on missing amount in signrawtransaction* (Anthony Towns) Pull request description: Signatures using segregated witness commit to the amount being spent, so that value must be passed into signrawtransactionwithkey and signrawtransactionwithwallet. This ensures an error is issued if that doesn't happen, rather than just assuming the value is 0 and producing a signature that is almost certainly invalid. Based on Ben Woosley's #12458, Fixes: #12429. Tree-SHA512: 8e2ff89d5bcf79548e569210af0d850028bc98d86c149b92207c9300ab1d63664a7e2b222c1be403a15941aa5cf36ccc3c0d570ee1c1466f3496b4fe06c17e11
2018-07-09Merge #13452: rpc: have verifytxoutproof check the number of txns in proof ↵Wladimir J. van der Laan
structure d280617bf569f84457eaea546541dc74c67cd1e4 [qa] Add a test for merkle proof malleation (Suhas Daftuar) ed82f1700006830b6fe34572b66245c1487ccd29 have verifytxoutproof check the number of txns in proof structure (Gregory Sanders) Pull request description: Recent publication of a weakness in Bitcoin's merkle tree construction demonstrates many SPV applications vulnerable to an expensive to pull off yet still plausible attack: https://bitslog.wordpress.com/2018/06/09/leaf-node-weakness-in-bitcoin-merkle-tree-design/ This change would at least allow `verifytxoutproof` to properly validate that the proof matches a known block, with known number of transactions any time after the full block is processed. This should neuter the attack entirely. The negative is that a header-only processed block/future syncing mode would cause this to fail until the node has imported the data required. related: #13451 `importprunedfunds` needs this check as well. Can expand it to cover this if people like the idea. Tree-SHA512: 0682ec2b622a38b29f3f635323e0a8b6fc071e8a6fd134c954579926ee7b516e642966bafa667016744ce49c16e19b24dbc8801f982a36ad0a6a4aff6d93f82b
2018-07-09Merge #13570: RPC: Add new "getzmqnotifications" methodWladimir J. van der Laan
161e8d40a4e4c0e701b6c8142b8dcacf2190545e RPC: Add new getzmqnotifications method. (Daniel Kraft) caac39b0ace38aa088d88c1a5a9a9dbb4d2e893f Make ZMQ notification interface instance global. (Daniel Kraft) Pull request description: This adds a new RPC method `getzmqnotifications`, which returns information about all active ZMQ notification endpoints. This is useful for software that layers on top of bitcoind, so it can verify that ZeroMQ is enabled and also figure out where it should listen. See #13526. Tree-SHA512: edce722925741c84ddbf7b3a879fc9db1907e5269d0d97138fe724035d93ee541c2118c24fa92f4197403f380d0e25c2fda5ca6c62d526792ea749cf527a99a0
2018-07-10[tests] functional test for createmultisig RPCAnthony Towns
2018-07-07Merge #13564: [wallet] loadwallet shouldn't create new wallets.MarcoFalke
ea65182f03 [wallet] loadwallet shouldn't create new wallets. (John Newbery) Pull request description: A bug in the initial implementation of loadwallet meant that if the arguement was a directory that didn't contain a wallet.dat file, a new wallet would be created in that directory. Fix that so that if a directory is passed in, it must contain a wallet.dat file. Bug reported by promag (João Barbosa). Tree-SHA512: 0a59fa8a33fde51a88544ad288b00e4995284fe16424f643076aaba42b8244fff362145217650ee53d518dfab7efbed4237632c34cdd3dcbbecaa9ecaab5fd7b
2018-07-05Merge #13467: [Tests] Make p2p_segwit easier to debugWladimir J. van der Laan
e3aab295e [tests] p2p_segwit: sync_blocks in subtest wrapper. (John Newbery) 55e805085 [tests] p2p_segwit: remove unnecessary arguments from subtests. (John Newbery) 25711c269 [tests] p2p_segwit: log and assert segwit status in subtest wrapper. (John Newbery) 6839863d5 [tests] p2p_segwit: Make sure each subtest leaves utxos for the next. (John Newbery) bfe32734d [tests] p2p_segwit: wrap subtests with subtest wrapper. (John Newbery) 2af4e398d [tests] p2p_segwit: re-order function definitions. (John Newbery) 94a0134a4 [tests] p2p_segwit: standardise comments/docstrings. (John Newbery) f7c7f8ecf [tests] p2p_segwit: Fix flake8 warnings. (John Newbery) Pull request description: `p2p_segwit.py` is a very long test, composed of multiple subtests. When it fails it's difficult to debug for a couple of reasons: - Control flow jumps between different methods in the test class, so it's a little difficult to follow the code. - state may be carried forward unintentionally from one subtest to the next. Improve that by wrapping the subtests with a `@subtest` decorator which: - logs progress - asserts state after each subtest As usual, I've also included a few commits which generally tidy up the test and improve style. Tree-SHA512: 3650602b3ce9823dc968cc5f2e716757feadc3dbedb3605eb79bb3df91a6db8ae53431f253b440da690e3a8e9d76de84fad4368a2663aeb40e6b9427cf948870
2018-07-05RPC: Add new getzmqnotifications method.Daniel Kraft
This adds a new RPC method "getzmqnotifications", which returns information about all active ZMQ notification endpoints. This is useful for software that layers on top of bitcoind, so it can verify that ZeroMQ is enabled and also figure out where it should listen. See https://github.com/bitcoin/bitcoin/issues/13526.
2018-06-30Merge #13522: [tests] Fix p2p_sendheaders raceMarcoFalke
75848bcf40 [tests] Fix p2p_sendheaders race (John Newbery) Pull request description: p2p_sendheaders has a race in part 1.3. part 1.2 sends a block to the node over the 'test_node' connection, but doesn't wait for an inv to be received on the 'inv_node' connection. If we get to part 1.3 before that inv has been received, then the subsequent call to check_last_inv_announcement could fail. Tree-SHA512: ba9baffb3a9c0d379259190c737a7a4ad2e1133005a5b026af4f6b67a2978e24db39289551ad29134151879593ef5472be7e569a3557c0740fb51f5c56263d9a
2018-06-29[RPC] [wallet] allow getbalance to use min_conf and watch_only without accounts.John Newbery
2018-06-29[tests] p2p_segwit: sync_blocks in subtest wrapper.John Newbery
2018-06-29[tests] p2p_segwit: remove unnecessary arguments from subtests.John Newbery
2018-06-29[tests] p2p_segwit: log and assert segwit status in subtest wrapper.John Newbery
2018-06-29[tests] p2p_segwit: Make sure each subtest leaves utxos for the next.John Newbery
2018-06-29[tests] p2p_segwit: wrap subtests with subtest wrapper.John Newbery
The subtest wrapper logs the name of the subtest.
2018-06-29[tests] p2p_segwit: re-order function definitions.John Newbery
This re-orders the defintions in p2p_segwit so subtests are defined in the order that they're called.
2018-06-29[tests] p2p_segwit: standardise comments/docstrings.John Newbery
2018-06-29[tests] p2p_segwit: Fix flake8 warnings.John Newbery
2018-06-29Merge #13517: qa: Remove need to handle the network thread in testsWladimir J. van der Laan
fa87da2f172ae2e6dc15e9ed156a3564a8ecfbdd qa: Avoid start/stop of the network thread mid-test (MarcoFalke) Pull request description: This simplifies test writing by removing the need to handle the network thread in tests. E.g. start thread, join thread, restart thread mid-test, adding p2p connections at the "right" time, ... Tree-SHA512: 533642f12fef5496f1933855edcdab1a7ed901d088d34911749cd0f9e044c8a6cb1f89985ac3a7f41a512943663e4e270a61978f6f072143ae050cd102d4eab8
2018-06-28[wallet] loadwallet shouldn't create new wallets.John Newbery
A bug in the initial implementation of loadwallet meant that if the arguement was a directory that didn't contain a wallet.dat file, a new wallet would be created in that directory. Fix that so that if a directory is passed in, it must contain a wallet.dat file. Bug reported by promag (João Barbosa).
2018-06-29Merge #13535: [qa] wallet_basic: Specify minimum required amount for listunspentMarcoFalke
fa103a5d5e [qa] wallet_basic: Specify minimum required amount for listunspent (MarcoFalke) Pull request description: A value less than that would fail the tests later on anyway: ``` File "./test/functional/wallet_basic.py", line 250, in run_test self.nodes[1].sendrawtransaction(signed_raw_tx['hex']) test_framework.authproxy.JSONRPCException: bad-txns-in-belowout, value in (1.00) < value out (49.998) (code 16) (-26) Tree-SHA512: 7e72ad02b5623bc078610da06c34721836822a920a4e85b12a1e0f339e3205cdc11d39763197770e649fb73376f922ff91a8f244b465195e50a6798658e04f80