aboutsummaryrefslogtreecommitdiff
path: root/test/functional
AgeCommit message (Collapse)Author
2018-06-28[tests] Check signrawtransaction* errors on missing prevtx infoAnthony Towns
2018-06-26Merge #13498: [wallet] Fixups from account API deprecationPieter Wuille
df10f07db1 [wallet] Don't use accounts when checking balance in sendmany (John Newbery) e209184101 [wallet] deprecate sendfrom RPC method. (John Newbery) Pull request description: A couple of fixups from the accounts API deprecation PR (#12953): - properly deprecate `sendfrom` - don't use accounts when calculating balance in `sendmany` (unless the `-deprecatedrpc=accounts` flag is being used) Tree-SHA512: 1befde055067438c4c3391bbff1aaed0e6249efd708c567db3f1faad40a0f28e64f95e5bad0679ae826d24a0239e4bc8a1c392dc93e2e7502343a7f6b1d1845c
2018-06-25qa: Avoid start/stop of the network thread mid-testMarcoFalke
2018-06-25[qa] wallet_basic: Specify minimum required amount for listunspentMarcoFalke
2018-06-24Merge #13160: wallet: Unlock spent outputsWladimir J. van der Laan
fd9b3a71824e33728f267e6f288b6224ad1047e1 test: Output should be unlocked when spent (João Barbosa) 54c3bb4cf805ccee91efb9f8cdadea87e0797989 wallet: Unlock spent outputs (João Barbosa) Pull request description: Fixes #12738. Tree-SHA512: 2c1694727aea0c658d07566c7d11d7afe91218053f84d568fac97413348fa5a977243d6cdeebd1c6550816489e35cb3a31667c8354d9b350de99f979d641d605
2018-06-23Merge #13512: [qa] mininode: Expose connection state through is_connectedMarcoFalke
fa1eac9cdb [qa] mininode: Expose connection state through is_connected (MarcoFalke) Pull request description: This gets rid of some non-type safe string comparisons and access to members that are implementation details of `class P2PConnection(asyncore.dispatcher)`. Such refactoring is required to replace the deprecated asyncore with something more sane. Changes: * Get rid of non-enum member `state` and replace is with bool `connected` * Get rid of confusing argument `pushbuf` and literally just push to the buffer at the call site Tree-SHA512: 09074c7e5ed251a2e0509ef205ab82f89887c1e1fa1cc6efc1db60d196eb2403788a4987df8809fd06d80ef652e614c5d3c3fdef70096fc5815102243388288d
2018-06-22[qa] mininode: Expose connection state through is_connectedMarcoFalke
2018-06-22[tests] Fix p2p_sendheaders raceJohn Newbery
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.
2018-06-22[qa] Add a test for merkle proof malleationSuhas Daftuar
2018-06-21Merge #13111: Add unloadwallet RPCJonas Schnelli
fe65bdec2 bugfix: Delete walletView in WalletFrame::removeWallet (João Barbosa) 0b82bac76 bugfix: Remove dangling wallet env instance (João Barbosa) 0ee77b207 ui: Support wallets unloaded dynamically (João Barbosa) 9f9b50d5f doc: Add release notes for unloadwallet RPC (João Barbosa) ccbf7ae74 test: Wallet methods are disabled when no wallet is loaded (João Barbosa) 4940a20a4 test: Add functional tests for unloadwallet RPC (João Barbosa) 6608c369b rpc: Add unloadwallet RPC (João Barbosa) 537efe19e rpc: Extract GetWalletNameFromJSONRPCRequest from GetWalletForJSONRPCRequest (João Barbosa) Pull request description: This patch adds wallet unload feature via RPC. It also adds UI support for unloaded wallets. Tree-SHA512: 7c7f9f32f7a2266d2df574aa6b95f993c3dc82736f93304562122beb8756fb28cd22d03866b48f493c747441f22d30e196b098dec435cc25e035633f090351ea
2018-06-18[tests] Remove accounts from wallet_importprunedfunds.pyJohn Newbery
2018-06-18[wallet] deprecate sendfrom RPC method.John Newbery
2018-06-18bugfix: Remove dangling wallet env instanceJoão Barbosa
2018-06-18test: Wallet methods are disabled when no wallet is loadedJoão Barbosa
2018-06-18test: Add functional tests for unloadwallet RPCJoão Barbosa
2018-06-16Merge #13448: Add linter: Make sure we explicitly open all text files using ↵Wladimir J. van der Laan
UTF-8 encoding in Python c8176b3cc7556d7bcec39a55ae4d6ba16453baaa Add linter: Make sure we explicitly open all text files using UTF-8 or ASCII encoding in Python (practicalswift) 634bd970013eca90f4b4c1f9044eec8c97ba62c2 Explicitly specify encoding when opening text files in Python code (practicalswift) Pull request description: Add linter: Make sure we explicitly open all text files using UTF-8 encoding in Python. As requested by @laanwj in #13440. Tree-SHA512: 1651c00fe220ceb273324abd6703aee504029b96c7ef0e3029145901762c733c9b9d24927da281394fd4681a5bff774336c04eed01fafea997bb32192c334c06
2018-06-14Merge #13451: rpc: expose CBlockIndex::nTx in getblock(header)Wladimir J. van der Laan
86edf4a2a502416ba8d6cebbce61030992f7ff6f expose CBlockIndex::nTx in getblock(header) (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/ Including the coinbase in the txoutproof seems the most effective fix, however results in a significant efficiency downgrade. Transactors will not even know a priori what the size of their proof will be within a couple orders of magnitude, unless they use the mid-state of SHA2 as detailed in the blog post. Some applications, like Elements blockchain platform that take SPV-style proofs have optional access to a bitcoind to verify these proofs of inclusion and check depth in the chain. Returning `CBlockIndex::nTx` would allow an extremely easy and compact way of checking the depth of the tree, with no additional overhead to the codebase, and works with pruned nodes. `getblockheader` is arguably not the place for it, but as mentioned before, is a natural workflow for us checking depth of a block in a possibly pruned node. We should also ensure that `verifytxoutproof` ends up validating this depth fact as well, but left this for another PR. Tree-SHA512: af4cf48e704c6088f8da06a477fda1aaa6f8770cee9b876c4465d1075966d6a95831a88817673fe5a0d6bbcdc1ffcbc1892e2be0d838c60fc6958d33eacdcc14
2018-06-13Merge #13350: [tests] Add logging to provide anchor points when debugging ↵MarcoFalke
p2p_sendheaders 2ce81867b2 [tests] Add logging to provide anchor points when debugging failures. (Lowell Manners) Pull request description: refs #12453 Tree-SHA512: 0ad432bd848723a5b813df4d35fcd8c81d152f042499c8340a9a2a9b7918d6e785efbf9f07b63b6c0253a949044cebdb51802971c09fb8dde0efa5169f34ef20
2018-06-13expose CBlockIndex::nTx in getblock(header)Gregory Sanders
2018-06-12Explicitly specify encoding when opening text files in Python codepracticalswift
2018-06-12Merge #13120: policy: Treat segwit as always activeWladimir J. van der Laan
fa7a6cf1b36284db70e941bd2915fd6edbb0f9d6 policy: Treat segwit as always active (MarcoFalke) Pull request description: Now that segwit is active for a long time, there is no need to reject transactions with the reason that segwit hasn't activated. Strictly speaking, this is a bug fix, because with the release of 0.16, we create segwit transactions in our wallet by default without checking if they are allowed by local policy. More broadly, this simplifies the code as if "premature witness" was always set to true with the corresponding command line args. Tree-SHA512: 484c26aa3a66faba6b41e8554a91a29bfc15fbf6caae3d5363a3966283143189c4bd5333a610b0669c1238f75620691264e73f6b9f1161cdacf7574d946436da
2018-06-12Merge #13440: qa: Log as utf-8Wladimir J. van der Laan
fa8071a0985700a4641ce77dac2cb2fa285d3afe qa: Log as utf-8 (MarcoFalke) Pull request description: Explicitly read and write the log files with utf-8 as encoding Tree-SHA512: ca28f37f34a09845c736ff6c4c21733c3c39584f52c81e48ff25e5e35979c317d0989862b2b93acc7e359fbcc20b99533365455830b2ddb41eb4d8c17314534e
2018-06-11qa: Log as utf-8MarcoFalke
2018-06-11Merge #13060: [wallet] [rpc] Remove getlabeladdress RPCWladimir J. van der Laan
67e0e04140b3dfac12d628cee391d40b5fac5cfa [wallet] [docs] Update release notes for removing `getlabeladdress` (John Newbery) 81608178cff793ee205a4f70481c76d34c5448a4 [wallet] [rpc] Remove getlabeladdress RPC (John Newbery) Pull request description: labels are associated with addresses (rather than addresses being associated with labels, as was the case with accounts). The getlabeladdress does not make sense in this model, so remove it. getaccountaddress is still supported for one release as the accounts API is deprecated. Tree-SHA512: 7f45d0456248ebcc4e54dd34e2578a09a8ea8e4fceda75238ccea9d731dc99a3f3c0519b18a9739de17d2e6e59c9c2259ba67c9ae2e3cb2a40ddb14b9193fe29
2018-06-08qa: Remove portseed_offset from test runnerMarcoFalke
2018-06-05Merge #13367: qa: Increase includeconf test coverageWladimir J. van der Laan
fa4760fbb3f1099dcd3c43ebc53c2a761a2170e8 qa: Increase includeconf test coverage (MarcoFalke) Pull request description: This adds some missing `return false` for error conditions and adds test coverage [1] for those. Also, extend recursion warning when the chain was set in one of the includeconfs. [1] See the red lines in https://marcofalke.github.io/btc_cov/total.coverage/src/util.cpp.gcov.html for missing coverage. Tree-SHA512: d32563c9bb277879895a173e699034db5ecdb4061a1ec8890c566d61e36a09efa5eda19a029baf952ff6d568f8b9684a13a0bb90827850075470975e2088fee4
2018-06-01qa: Increase includeconf test coverageMarcoFalke
2018-06-01Merge #13352: qa: Avoid checking reject code for nowWladimir J. van der Laan
faac7a2db4f9f511c901cb1b4d4e7c599b92884f qa: Avoid checking reject code for now (MarcoFalke) Pull request description: The node will often disconnect before sending a reject code. A more robust solution would be to read from the debug log. See #13006 Tree-SHA512: 1dabf8a43dabbc722f4ffe4fbc1f870090253a66290b2d1a95e7a24e14c6442b493c314480c0314587164eb65e5d468aa9eb5e107ad90bb3ca821a97ea4d373c
2018-06-01Merge #13353: qa: Fixup setting of PATH env varWladimir J. van der Laan
fa26cf015658ac2aa52b5e5656e38af9a12160cc qa: Fixup setting of PATH env var (MarcoFalke) Pull request description: This was an oversight of mine in #13188 Can be trivially tested with `BITCOIND=bitcoin-qt ./test/functional/wallet_disable.py` before and after this fix. Tree-SHA512: 06c7b2f12158855eb2b6392861943821bd7ad3152cf0dd49ac4abd878e5b937ebee55e256ce5bdc1c2a9c775a452112c34533366c934ff5f0f412b3a7e1c8118
2018-06-01Merge #13058: [wallet] `createwallet` RPC - create new wallet at runtimeJonas Schnelli
f7e153e95 [wallets] [docs] Add release notes for createwallet RPC. (John Newbery) 32167e830 [wallet] [tests] Add tests for `createwallet` RPC. (John Newbery) 942131774 [wallet] [rpc] Add `createwallet` RPC (John Newbery) Pull request description: Adds a `createwallet` RPC to dynamically create a new wallet at runtime. Includes tests and release notes. Tree-SHA512: e0d89e3ae498234e9db5b827c56804cbab64f18a1875e2b5e676172c110278ea1b9e93a8a61b8dd80e2f2a691490bf229e923e4ccb284a1d3e420b8317815866
2018-05-31[wallet] [tests] Add tests for `createwallet` RPC.John Newbery
2018-05-30qa: Fixup setting of PATH env varMarcoFalke
2018-05-30qa: Avoid checking reject code for nowMarcoFalke
The node will often disconnect before sending a reject code. A more robust solution would be to read from the debug log.
2018-05-30Merge #13069: docs: Fix typosMarcoFalke
d8c4998f31 Fix typos (practicalswift) Pull request description: Fix typos. Tree-SHA512: 9af52a9799e6892b162e4aa1bcd6585502e10650b8aced59e7346dbb2f08544330081eb79328255fad1d358c095507956e049d354c4383b6965d4d5a7d635425
2018-05-30[tests] Add logging to provide anchor points when debugging failures.Lowell Manners
refs #12453
2018-05-30Test gArgs erroring on unknown argsAndrew Chow
2018-05-29policy: Treat segwit as always activeMarcoFalke
2018-05-29Merge #13281: test: Move linters to test/lint, add readmeWladimir J. van der Laan
fa3c910bfeab00703c947c5200a64c21225b50ef test: Move linters to test/lint, add readme (MarcoFalke) Pull request description: This moves the checks and linters from `devtools` to a subfolder in `test`. (Motivated by my opinion that the dev tools are mostly for generating code and updating the repo whereas the linters are read-only checks.) Also, adds a readme to clarify that checks and linters are only meant to prevent bugs and user facing issues, not merely stylistic preference or inconsistencies. (This is motivated by the diversity in developers and work flows as well as existing code styles. It would be too disruptive to change all existing code to a single style or too burdensome to force all developers to adhere to a single style. Also note that our style guide is changing, so locking in at the wrong style "too early" would only waste resources.) Tree-SHA512: 9b10e89f2aeaf0c8a9ae248aa891d74e0abf0569f8e5dfd266446efa8bfaf19f0ea0980abf0b0b22f0d8416ee90d7435d21a9f9285b66df43f370b7979173406
2018-05-29Merge #13134: net: Add option `-enablebip61` to configure sending of BIP61 ↵Wladimir J. van der Laan
notifications 87fe292d897e09e176ac7e254144466c319cc9ac doc: Mention disabling BIP61 in bips.md (Wladimir J. van der Laan) fe16dd8226d924f44432c5b5014aa49ff45c82ff net: Add option `-enablebip61` to configure sending of BIP61 notifications (Wladimir J. van der Laan) Pull request description: This commit adds a boolean option `-peersendreject`, defaulting to `1`, that can be used to disable the sending of [BIP61](https://github.com/bitcoin/bips/blob/master/bip-0061.mediawiki) `reject` messages. This functionality has been requested for various reasons: - security (DoS): reject messages can reveal internal state that can be used to target certain resources such as the mempool more easily. - bandwidth: a typical node sends lots of reject messages; this counts against upstream bandwidth. Also the reject messages tend to be larger than the message that was rejected. On the other hand, reject messages can be useful while developing client software (I found them indispensable while creating bitcoin-submittx), as well as for our own test cases, so whatever the default becomes on the long run, IMO the functionality should be retained as option. But that's a discussion for later, for now it's simply a node operator decision. Also adds a RPC test that checks the functionality. Tree-SHA512: 9488cc53e13cd8e5c6f8eb472a44309572673405c1d1438c3488f627fae622c95e2198bde5ed7d29e56b948e2918bf1920239e9f865889f4c37c097c37a4d7a9
2018-05-25test: Output should be unlocked when spentJoão Barbosa
2018-05-24test: Move linters to test/lint, add readmeMarcoFalke
2018-05-24Merge #13304: qa: Fix wallet_listreceivedby raceMarcoFalke
fa865efa4a qa: Fix wallet_listreceivedby race (MarcoFalke) Pull request description: Generating a block on node 0 will only get node 0 out of IBD and not node 1. So the inv for the `txid` is dropped by node 1 and the call to `sync_all` fails. Solve it by a call to `sync_blocks` after `generate`. Tree-SHA512: e21b01a9e8c90bd6a3aad290c97cc4866ab384e22797b318eed55ae2767512203597d3a184b23ad5a3fe76bdbb8a3d5c51e097d56b160232851164434059ff23
2018-05-23Merge #10757: RPC: Introduce getblockstats to plot thingsWladimir J. van der Laan
41d0476f62269027ec2193a5f80d508d789de8aa Tests: Add data file (Anthony Towns) 4cbfb6aad9ba8fa17b5e7ed3e9a36dc8a24f1fcf Tests: Test new getblockstats RPC (Jorge Timón) 35e77a0288bcac5594ff25c10c9679a161cb730b RPC: Introduce getblockstats (Jorge Timón) cda8e36f019dd181e5c3774961b4f1335e5602cb Refactor: RPC: Separate GetBlockChecked() from getblock() (Jorge Timón) Pull request description: It returns per block statistics about several things. It should be easy to add more if people think of other things to add or remove some if I went too far (but once written, why not keep it? EDIT: answer: not to test or maintain them). The currently available options are: minfee,maxfee,totalfee,minfeerate,maxfeerate,avgfee,avgfeerate,txs,ins,outs (EDIT: see updated list in the rpc call documentation) For the x axis, one can use height or block.nTime (I guess I could add mediantime if there's interest [EDIT: nobody showed interest but I implemented mediantime nonetheless, in fact there's no distinction between x or y axis anymore, that's for the caller to judge]). To calculate fees, -txindex is required. Tree-SHA512: 2b2787a3c7dc4a11df1fce62c8a4c748f5347d7f7104205d5f0962ffec1e0370c825b49fd4d58ce8ce86bf39d8453f698bcd46206eea505f077541ca7d59b18c
2018-05-23qa: Fix wallet_listreceivedby raceMarcoFalke
2018-05-22Tests: Add data fileAnthony Towns
2018-05-22Tests: Test new getblockstats RPCJorge Timón
Includes commit from Anthony Towns @ajtowns: Tests: Save and load block and corresponding expected statistics
2018-05-19[rpc] [wallet] Add 'hdmasterkeyid' alias return values.John Newbery
Restores the return value in getwalletinfo() and getaddressinfo() RPC methods for backwards compatibility
2018-05-19[refactor] manually change remaining instances of master key to seed.John Newbery
2018-05-19scripted-diff: Rename master key to seedJohn Newbery
-BEGIN VERIFY SCRIPT- ren() { git grep -l "\<$1\>" 'src/*.cpp' 'src/*.h' test | xargs sed -i "s:\<$1\>:$2:g"; } ren GenerateNewHDMasterKey GenerateNewSeed ren DeriveNewMasterHDKey DeriveNewSeed ren SetHDMasterKey SetHDSeed ren hdMasterKeyID hd_seed_id ren masterKeyID seed_id ren SetMaster SetSeed ren hdmasterkeyid hdseedid ren hdmaster hdseed -END VERIFY SCRIPT-
2018-05-16[wallet] [rpc] Remove getlabeladdress RPCJohn Newbery
labels are associated with addresses (rather than addresses being associated with labels, as was the case with accounts). The getlabeladdress does not make sense in this model, so remove it. getaccountaddress is still supported for one release as the accounts API is deprecated.