aboutsummaryrefslogtreecommitdiff
path: root/test/functional
AgeCommit message (Collapse)Author
2019-02-28test: Bump timeout on tests that timeout on windowsMarcoFalke
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-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
2019-02-16Implement joinpsbts RPC and testsAndrew Chow
Adds a joinpsbts RPC which combines multiple distinct PSBTs into one PSBT.
2019-02-16Implement utxoupdatepsbt RPC and testsAndrew Chow
2019-02-15Merge #15383: [rpc] mining: Omit uninitialized currentblockweight, ↵MarcoFalke
currentblocktx fa178a6385 [rpc] mining: Omit uninitialized currentblockweight, currentblocktx (MarcoFalke) Pull request description: Previously we'd report "0", which could be mistaken for a valid number. E.g. the number of transactions is 0 or the block weight is 0, whatever that means. Tree-SHA512: ee94ab203a329e272211b726f4c23edec4b09c650ec363b77fd59ad9264165d73064f78ebb9e11b5c2c543b73c157752410a307655560531c7d5444d203aa0ea
2019-02-14Import public keys in orderAndrew Chow
Do public key imports in the order that they are specified in the import or in the descriptor range.
2019-02-14Test pubkey import to keypoolAndrew Chow
2019-02-14Fetch keys from keypool when private keys are disabledAndrew Chow
When private keys are disabled, still fetch keys from the keypool if the keypool has keys. Those keys come from importing them and adding them to the keypool.
2019-02-15Merge #14021: Import key origin data through descriptors in importmultiMeshCollider
cb3511b9d Add release notes for importing key origin info change (Andrew Chow) 4c75a69f3 Test importing descriptors with key origin information (Andrew Chow) 02d6586d7 Import KeyOriginData when importing descriptors (Andrew Chow) 3d235dff5 Implement a function to add KeyOriginInfo to a wallet (Andrew Chow) eab63bc26 Store key origin info in key metadata (Andrew Chow) 345bff601 Remove hdmasterkeyid (Andrew Chow) bac8c676a Add a method to CWallet to write just CKeyMetadata (Andrew Chow) e7652d3f6 Add WriteHDKeypath function and move *HDKeypath to util/bip32.{h,cpp} (Andrew Chow) c45415f73 Refactor keymetadata writing to a separate method (Andrew Chow) Pull request description: This PR allows for key origin data as defined by the descriptors document to be imported to the wallet when importing a descriptor using `importmulti`. This allows the `walletprocesspsbt` to include the BIP 32 derivation paths for keys that it is watching that are from a different HD wallet. In order to make this easier to use, a new field `hdmasterkeyfingerprint` has been added to `getaddressinfo`. Additionally I have removed `hdmasterkeyid` as was planned. I think that this API change is fine since it was going to be removed in 0.18 anyways. `CKeyMetadata` has also been extended to store key origin info to facilitate this. Tree-SHA512: 9c7794f3c793da57e23c5abbdc3d58779ee9dea3d53168bb86c0643a4ad5a11a446264961e2f772f35eea645048cb60954ed58050002caee4e43cd9f51215097
2019-02-14Test importing descriptors with key origin informationAndrew Chow
2019-02-14Merge #14481: Add P2SH-P2WSH support to listunspent RPCWladimir J. van der Laan
6ca836ab3abef5a90df0c3c4e4983f328b1afe00 Add release note for listunspent P2WSH change (MeshCollider) 928beae007fc2f951e79ea307a5e983af4cb3acf Add test for P2SH-P2WSH in signrawtransactionwithkey and listunspent (MeshCollider) 314784a60f18424b004e935aa6e41b824e9645b3 Make listunspent and signrawtransaction RPCs support witnessScript (MeshCollider) Pull request description: This is a reworked version of #11708 after #12427 and the `signrawtransaction` split. For a P2WSH address, listunspent should return the witness script, and for a P2SH-P2WSH address, it should also return the inner witness script (because SignTransaction will automatically wrap it in P2SH if required). Includes a test which also tests the behaviour of #12427, and release note. Tree-SHA512: a8e72cf16930312bf48ec47e44a68f8d7e26664043c1b4cc0983eb25aec4087e511188ff9a0f181cd7b8a0c068c60d7f1e7e3f226b79e8c48890039dcf57f7b7
2019-02-14Remove hdmasterkeyidAndrew Chow
2019-02-14Merge #14978: Factor out PSBT utilities from RPCs for use in GUI code; ↵MeshCollider
related refactoring. 102faad81 Factor out combine / finalize / extract PSBT helpers (Glenn Willen) 78b9893d0 Remove op== on PSBTs; check compatibility in Merge (Glenn Willen) bd0dbe876 Switch away from exceptions in refactored tx code (Glenn Willen) c6c3d42a7 Move PSBT definitions and code to separate files (Glenn Willen) 81cd95884 Factor BroadcastTransaction out of sendrawtransaction (Glenn Willen) c734aaa15 Split DecodePSBT into Base64 and Raw versions (Glenn Willen) 162ffefd2 Add pf_invalid arg to std::string DecodeBase{32,64} (Glenn Willen) Pull request description: * Move most PSBT definitions into psbt.h. * Move most PSBT RPC utilities into psbt.{h,cpp}. * Move wallet-touching PSBT RPC utilities (FillPSBT) into wallet/psbtwallet.{h,cpp}. * Switch exceptions from JSONRPCError() to new PSBTException class. * Split DecodePSBT into DecodeBase64PSBT (old behavior) and DecodeRawPSBT. * Add one new version of DecodeBase64 utility in strencodings.h (and corresponding DecodeBase32 for completeness). * Factor BroadcastTransaction utility function out of sendrawtransaction RPC handler in rpc/rawtransaction.cpp Note: For those keeping score at home wondering why refactor, this is in anticipation of (and developed in parallel with) a change to actually introduce GUI use of all this stuff, which is already under development and working-ish. Tree-SHA512: 2197c448e657421f430943025357597e7b06c4c377d5d4b2622b9edea52a7193c48843dd731abb3a88ac4023a9c88d211991e0a9b740c22f2e1cbe72adefe390
2019-02-13Remove manual byte editing in wallet_tx_clone func testGregory Sanders
2019-02-13Add test for P2SH-P2WSH in signrawtransactionwithkey and listunspentMeshCollider
2019-02-12Merge #15238: [QA] remove some magic mining constants in functional testsMarcoFalke
b651ef7e1c submitheader: more directly test missing prev block header (Gregory Sanders) 1e7f741745 remove some magic mining constants in functional tests (Gregory Sanders) Pull request description: The fewer magic numbers the better. Also more directly tested a `submitheader` case of bad previous blockhash. Tree-SHA512: 52b01a6aa199fa909eea4e9e84409a901933e545724e33149cc4132c82168199fd678809b6d94d95c9ff6ad02238a9552363620d13b8beaa5d4b67ade9ef425c
2019-02-12Merge #15378: tests: Added missing tests for RPC wallet errorsMarcoFalke
dc3b2ccb5f tests: Added missing tests for RPC wallet errors (Ben Carman) Pull request description: Tree-SHA512: b18dcd4f7547c974c93ae67dcd92a168bdb55951b164cf174cb1e59e0daa463187068aec43108309a75d65721a5c0bcdf10a16a9869620f160121e2287559926
2019-02-12[rpc] mining: Omit uninitialized currentblockweight, currentblocktxMarcoFalke
2019-02-12Merge #13787: Test for Windows encoding issueMarcoFalke
15b31032a6 appveyor: Remove outdated libraries (Chun Kuan Lee) ae892adceb tests: accept unicode characters on Windows (Chun Kuan Lee) Pull request description: This PR removes unused Windows compatible path. Encoding issues has been solved. Tree-SHA512: d24dce035fe3b576eaa002896f815a6691e88618ea371171d7e39883e1d63b3ed4d4631ab3b3a26bd67ae4e8ae13b1ff188942ab7ac6a93d704e0de301368cd0
2019-02-12Merge #14543: [QA] minor p2p_sendheaders fix of height in coinbaseMarcoFalke
1cdb9bb51f minor p2p_sendheaders fix of height in coinbase (Gregory Sanders) Pull request description: > \# Now announce a header that forks the last two blocks Doesn't effect any behavior since BIP34 isn't active in regtest for many blocks. Tree-SHA512: 3f214b956a94250bb640f63b6ff707930e1d4cb8df1bbf0fef4012d89a94bafbde0d7b42bbe7113ec33810169281c22c6e389445921d99decb74aa56e87a0f27
2019-02-11tests: Added missing tests for RPC wallet errorsBen Carman
2019-02-12tests: accept unicode characters on WindowsChun Kuan Lee
2019-02-11Split DecodePSBT into Base64 and Raw versionsGlenn Willen
Split up DecodePSBT, which both decodes base64 and then deserializes a PartiallySignedTransaction, into two functions: DecodeBase64PSBT, which retains the old behavior, and DecodeRawPSBT, which only performs the deserialization. Add a test for base64 decoding failure.
2019-02-11Merge #15337: rpc: Fix for segfault if combinepsbt called with empty inputsMarcoFalke
30d0f7be6e rpc: Fix for segfault if combinepsbt called with empty inputs (benthecarman) Pull request description: Fixes #15300 Tree-SHA512: 25e7b4e6e48d8b0d197f0ab96df308fff33e2110f8929cb48914877fa7f4c4a84f173b1378fdb2dec5d03fe7d6d1aced4b577e55f9fe180d8147d9106ebf543f
2019-02-11Merge #15226: Allow creating blank (empty) wallets (alternative)MeshCollider
7687f7873 [wallet] Support creating a blank wallet (Andrew Chow) Pull request description: Alternative (kind of) to #14938 This PR adds a `blank` parameter to the `createwallet` RPC to create a wallet that has no private keys initially. `sethdseed` can then be used to make a clean wallet with a custom seed. `encryptwallet` can also be used to make a wallet that is born encrypted. Instead of changing the version number as done in #14938, a wallet flag is used to indicate that the wallet should be blank. This flag is set at creation, and then unset when the wallet is no longer blank. A wallet becomes non-blank when a HD seed is set or anything is imported. The main change to create a blank wallet is primarily taken from #14938. Also with this, the term "blank wallet" is used instead of "empty wallet" to avoid confusion with wallets that have balance which would also be referred to as "empty". This is built on top of #15225 in order to fix GUI issues. Tree-SHA512: 824d685e11ac2259a26b5ece99c67a7bda94a570cd921472c464243ee356b7734595ad35cc439b34357135df041ed9cba951e6edac194935c3a55a1dc4fcbdea
2019-02-10[wallet] Support creating a blank walletAndrew Chow
A blank wallet is a wallet that has no keys, script or watch only things. A new wallet flag indicating that it is blank will be set when the wallet is blank. Once it is no longer blank (a seed has been generated, keys or scripts imported, etc), the flag will be unset.
2019-02-08Merge #15370: test_runner: Remove unused --force optionMarcoFalke
fae8b8bb1a qa: Add tool-prefix to functional test readme (MarcoFalke) faf3d22725 test_runner: Remove unused --force option (MarcoFalke) Pull request description: When someone calls the script they already have all intention to call it, no need to specify a redundant `--force`. The functional tests are still disabled on the travis windows cross builds, where they'd run into issues when run under Wine. Tree-SHA512: ada0dd9b3c0cd28c5832a12c5e04c029dc3bfe5ddf366fd0abc24fb7914d2e0f0a873fe756ade7ba780a561abe9bc731838c289accc421deda481269e08514cd
2019-02-08qa: Add tool-prefix to functional test readmeMarcoFalke
2019-02-07test_runner: Remove unused --force optionMarcoFalke
2019-02-07Merge #14491: Allow descriptor imports with importmultiWladimir J. van der Laan
b985e9c850ea682eced7021faf6c7c835066c61b Add release notes for importmulti descriptor support (MeshCollider) fbb5e935eaf17d603ec62e1a704a174235540b71 Add test for importing via descriptor (MeshCollider) 9f48053d8f9a1feacc96d7e2a00c8a3a67576948 [wallet] Allow descriptor imports with importmulti (MeshCollider) d2b381cc91b2c4e74abe11e5bd66af647b70dafb [wallet] Refactor ProcessImport() to call ProcessImportLegacy() (John Newbery) 4cac0ddd258bc82258ccc99568d02d3b2415339d [wallet] Add ProcessImportLegacy() (John Newbery) a1b25e12a5f57048a4639964d57c0b46eb84cd4e [wallet] Refactor ProcessImport() (John Newbery) Pull request description: ~~Based on #14454 #14565, last two commits only are for review.~~ Best reviewed with `?w=1` Allows a descriptor to be imported into the wallet using `importmulti` RPC. Start and end of range can be specified for ranged descriptors. The descriptor is implicitly converted to old structures on import. Also adds a simple test of a P2SH-P2WPKH address being imported as a descriptor. More tests to come, as well as release notes. Tree-SHA512: 160eb6fd574c4ae5b70e0109f7e5ccc95d9309138603408a1114ceb3c558065409c0d7afb66926bc8e1743c365a3b300c5f944ff18b2451acc0514fbeca1f2b3