aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-01-16Add a lock to the wallet directoryMeshCollider
2018-01-15Merge #12173: [Qt] Use flexible font size for QRCode image addressWladimir J. van der Laan
59f9e2a Use flexible font size for QRCode image address (Jonas Schnelli) Pull request description: Bech32 addresses are currently cut off in the QRCode image in the GUI receive tab. This adds a simple font size calculation logic that "must" (down to 4pt) fix into the given image width. Examples OSX HiDPI: <img width="332" alt="bildschirmfoto 2018-01-12 um 11 25 40" src="https://user-images.githubusercontent.com/178464/34896144-c0c65d76-f78c-11e7-93e1-94dc8e203269.png"> <img width="322" alt="bildschirmfoto 2018-01-12 um 11 25 46" src="https://user-images.githubusercontent.com/178464/34896145-c0edfe1c-f78c-11e7-8c09-c15155e2160e.png"> Examples Ubuntu non HIDPI: <img width="314" alt="bildschirmfoto 2018-01-12 um 11 27 51" src="https://user-images.githubusercontent.com/178464/34896151-c88347f4-f78c-11e7-8a03-df8049dcfed6.png"> <img width="322" alt="bildschirmfoto 2018-01-12 um 11 27 42" src="https://user-images.githubusercontent.com/178464/34896152-c8bb881c-f78c-11e7-89d2-6f04ec608a19.png"> Tree-SHA512: d749763fb748b146f77fd8d88fb7d29b07a46cde0b0f303a4006ae9cc3521b3c2e8ab43b828e243514109379898b198552e17b8f316c5a869b0cc8246b054b86
2018-01-15Use flexible font size for QRCode image addressJonas Schnelli
2018-01-15Merge #12118: Sort mempool by min(feerate, ancestor_feerate)Wladimir J. van der Laan
0a22a52 Use mempool's ancestor sort in transaction selection (Suhas Daftuar) 7abfa53 Add test for new ancestor feerate sort behavior (Suhas Daftuar) 9a51319 Sort mempool by min(feerate, ancestor_feerate) (Suhas Daftuar) 6773f92 Refactor CompareTxMemPoolEntryByDescendantScore (Suhas Daftuar) Pull request description: This more closely approximates the desirability of a given transaction for mining, and should result in less re-sorting when transactions get removed from the mempool after being mined. I measured this as approximately a 5% speedup in removeForBlock. Tree-SHA512: ffa36b567c5dfe3e8908c545a459b6a5ec0de26e7dc81b1050dd235cac9046564b4409a3f8c5ba97bd8b30526e8fec8f78480a912e317979467f32305c3dd37b
2018-01-15Merge #11796: [tests] Functional test naming conventionWladimir J. van der Laan
5fecd84 [tests] Remove redundant import in blocktools.py test (Anthony Towns) 9b20bb4 [tests] Check tests conform to naming convention (Anthony Towns) 7250b4e [tests] README.md nit fixes (Anthony Towns) 82b2712 [tests] move witness util functions to blocktools.py (John Newbery) 1e10854 [tests] [docs] update README for new test naming scheme (John Newbery) Pull request description: Splitting #11774 into two parts -- this part updates the README with the proposed naming convention, and adds some checks to test_runner.py that the number of tests violating the naming convention doesn't increase too much. Idea is this part of the change should not introduce merge conflicts or require much rebasing, so reviews of the complicated bits won't become invalidated too often; while the second part will just be file renames, which will require regular rebasing and will introduce merge conflicts with pending PRs, but can be merged later, and should also be much easier to review, since it will only include relatively trivial changes. Tree-SHA512: b96557d41714addbbfe2aed62fb5a48639eaeb1eb3aba30ac1b3a86bb3cb8d796c6247f9c414c4695c4bf54c0ec9968ac88e2f88fb62483bc1a2f89368f7fc80
2018-01-15Merge #12127: Remove unused mempool indexWladimir J. van der Laan
8e617e3 Remove unused mempool index (Suhas Daftuar) Pull request description: We haven't used the "mining_score" index since 0.12, so remove it. Tree-SHA512: ae37b8663194986eaeecfc2bbeca7ecb4ae6f0d8384515fa218cbc939a580d4b9f7f997c5297c3f1b3c3a0651edb092f373ac9a4808aaec30d38cb99d5f3ed70
2018-01-13Use mempool's ancestor sort in transaction selectionSuhas Daftuar
Transaction selection for mining tracks ancestor feerates that are modified based on transactions that have already been selected. This commit de-duplicates the code so that the ancestor feerate sorting used by the mempool can also be directly applied to the miner.
2018-01-13Merge #12168: Trivial: Fix #include sys/fcntl.h to just fcntl.h (without sys/)MarcoFalke
648bdc8cc0 Trivial: Fix #include sys/fcntl.h to just fcntl.h (without sys/) (Jan Sarenik) Pull request description: http://pubs.opengroup.org/onlinepubs/009695399/functions/fcntl.html http://man7.org/linux/man-pages/man2/fcntl.2.html Tree-SHA512: 82c7e0aba55f34a6fec60bdecb712b65c84422461454f0ae9eed5e1bb31bf585c5a65f49bbdd5a89feb59140a998ad6fcd5573ede123a12b2ba2ff677d95cc2b
2018-01-12Merge #11970: Add test coverage for bitcoin-cli multiwallet callsMarcoFalke
a14dbff39e Allow multiwallet.py to be used with --usecli (Russell Yanofsky) f6ade9ce1a [tests] allow tests to be run with --usecli (John Newbery) ff9a363ff7 TestNodeCLI batch emulation (Russell Yanofsky) ca9085afc5 Prevent TestNodeCLI.args mixups (Russell Yanofsky) fcfb952bca Improve TestNodeCLI output parsing (Russell Yanofsky) Pull request description: Lack of test coverage was pointed out by @jnewbery in https://github.com/bitcoin/bitcoin/pull/11687#discussion_r158133900 Tree-SHA512: 5f10e31abad11a5edab0da4e2515e39547adb6ab9e55e50427ab2eb7ec9a43d6b896b579b15863e5edc9beee7d8bf1c84d9dabd247be0760a1b9ae39e1e8ee02
2018-01-12Add test for new ancestor feerate sort behaviorSuhas Daftuar
2018-01-12Trivial: Fix #include sys/fcntl.h to just fcntl.h (without sys/)Jan Sarenik
http://pubs.opengroup.org/onlinepubs/009695399/functions/fcntl.html http://man7.org/linux/man-pages/man2/fcntl.2.html
2018-01-11Merge #12082: Adding test case for SINGLE|ANYONECANPAY hash type in ↵MarcoFalke
tx_valid.json 18be3ab139 Adding test case for SINGLE|ANYONECANPAY hash type in tx_valid.json (Chris Stewart) Pull request description: We are missing a test vector for SINGLE|ANYONECANPAY inside of tx_valid.json. This addresses the issue #12060 Tree-SHA512: e3526113477dbf575c4a844cf489dcfa2c037c6d928af6f97413edc1a8d29cdf2143da96471cdfd3de08bf5ed178117ed67926fd70fd42ca391ac0bb0d08f3fd
2018-01-11Merge #12133: [qa] Fix rare failure in p2p-segwit.pyWladimir J. van der Laan
35c2b1f Fix rare failure in p2p-segwit.py (Suhas Daftuar) Pull request description: Avoid creating very small utxos that would violate an assumption in test_non_standard_witness. Fixes #11953 Tree-SHA512: 5fb7ae68f8731df819bab365923a84568b57227e4112f711fc2574767d15be83acd3e99d0d5bac94a42411a958b13a2119468babefed14efcfdda180004d4166
2018-01-11Merge #12150: Fix ListCoins test failure due to unset g_address_type, ↵MarcoFalke
g_change_type f765bb3788 Fix ListCoins test failure due to unset g_address_type, g_change_type (Russell Yanofsky) Pull request description: New global variables were introduced in #11403 and not setting them causes: ``` test_bitcoin: wallet/wallet.cpp:4199: CTxDestination GetDestinationForKey(const CPubKey&, OutputType): Assertion `false' failed. unknown location(0): fatal error in "ListCoins": signal: SIGABRT (application abort requested) ``` It's possible to reproduce the failure reliably by running: ``` src/test/test_bitcoin --log_level=test_suite --run_test=wallet_tests/ListCoins ``` Failures happen nondeterministically because boost test framework doesn't run tests in a specified order, and tests that run previously can set the global variables and mask the bug. Example travis failure: https://travis-ci.org/bitcoin/bitcoin/builds/327642495 Tree-SHA512: 3e0875716f66bc0304cf92a26457e6b54ecfe15ed962f4343577b05fc56bb577554422b7f53949ad6085ac5798ad7816b8176c5b01e050ddbfbb925d2732767a
2018-01-11Merge #12112: Docs: Remove the ending slashes from RPC URI format.Wladimir J. van der Laan
2be2b5d Remove the ending slashes from RPC URI format. (Jacky C) Pull request description: This resolves #11861 (A confusion caused by incorrect information in the release notes). More information can be found at #11861. Tree-SHA512: 35f85854b01a84acd5358e0c9deff881205111120277fa7cdf270801933c2603c2ae04fa4d55d233675c7298c2d37cc60c919f89e7e6091f5c61884025775ab0
2018-01-11Fix ListCoins test failure due to unset g_address_type, g_change_typeRussell Yanofsky
New global variables were introduced in #11403 and not setting them causes: test_bitcoin: wallet/wallet.cpp:4199: CTxDestination GetDestinationForKey(const CPubKey&, OutputType): Assertion `false' failed. unknown location(0): fatal error in "ListCoins": signal: SIGABRT (application abort requested) It's possible to reproduce the failure reliably by running: src/test/test_bitcoin --log_level=test_suite --run_test=wallet_tests/ListCoins Failures happen nondeterministically because boost test framework doesn't run tests in a specified order, and tests that run previously can set the global variables and mask the bug.
2018-01-10Merge #11403: SegWit wallet supportJonas Schnelli
b224a47a1 Add address_types test (Pieter Wuille) 7ee54fd7c Support downgrading after recovered keypool witness keys (Pieter Wuille) 940a21932 SegWit wallet support (Pieter Wuille) f37c64e47 Implicitly know about P2WPKH redeemscripts (Pieter Wuille) 57273f2b3 [test] Serialize CTransaction with witness by default (Pieter Wuille) cf2c0b6f5 Support P2WPKH and P2SH-P2WPKH in dumpprivkey (Pieter Wuille) 37c03d3e0 Support P2WPKH addresses in create/addmultisig (Pieter Wuille) 3eaa003c8 Extend validateaddress information for P2SH-embedded witness (Pieter Wuille) 30a27dc5b Expose method to find key for a single-key destination (Pieter Wuille) 985c79552 Improve witness destination types and use them more (Pieter Wuille) cbe197470 [refactor] GetAccount{PubKey,Address} -> GetAccountDestination (Pieter Wuille) 0c8ea6380 Abstract out IsSolvable from Witnessifier (Pieter Wuille) Pull request description: This implements a minimum viable implementation of SegWit wallet support, based on top of #11389, and includes part of the functionality from #11089. Two new configuration options are added: * `-addresstype`, with options `legacy`, `p2sh`, and `bech32`. It controls what kind of addresses are produced by `getnewaddress`, `getaccountaddress`, and `createmultisigaddress`. * `-changetype`, with the same options, and by default equal to `-addresstype`, that controls what kind of change is used. All wallet private and public keys can be used for any type of address. Support for address types dependent on different derivation paths will need a major overhaul of how our internal detection of outputs work. I expect that that will happen for a next major version. The above also applies to imported keys, as having a distinction there but not for normal operations is a disaster for testing, and probably for comprehension of users. This has some ugly effects, like needing to associate the provided label to `importprivkey` with each style address for the corresponding key. To deal with witness outputs requiring a corresponding redeemscript in wallet, three approaches are used: * All SegWit addresses created through `getnewaddress` or multisig RPCs explicitly get their redeemscripts added to the wallet file. This means that downgrading after creating a witness address will work, as long as the wallet file is up to date. * All SegWit keys in the wallet get an _implicit_ redeemscript added, without it being written to the file. This means recovery of an old backup will work, as long as you use new software. * All keypool keys that are seen used in transactions explicitly get their redeemscripts added to the wallet files. This means that downgrading after recovering from a backup that includes a witness address will work. These approaches correspond to solutions 3a, 1a, and 5a respectively from https://gist.github.com/sipa/125cfa1615946d0c3f3eec2ad7f250a2. As argued there, there is no full solution for dealing with the case where you both downgrade and restore a backup, so that's also not implemented. `dumpwallet`, `importwallet`, `importmulti`, `signmessage` and `verifymessage` don't work with SegWit addresses yet. They're remaining TODOs, for this PR or a follow-up. Because of that, several tests unexpectedly run with `-addresstype=legacy` for now. Tree-SHA512: d425dbe517c0422061ab8dacdc3a6ae47da071450932ed992c79559d922dff7b2574a31a8c94feccd3761c1dffb6422c50055e6dca8e3cf94a169bc95e39e959
2018-01-10Merge #12143: [Doc] Fix link for BIP-159 pull requestJonas Schnelli
91769d6e2 [Doc] Fix link for bip 159 pull request (azuchi) Pull request description: The link of the pull request for BIP-159 described in bips.md was a different link. Tree-SHA512: 818ea29259ff84a55282df8b0c59fc4ccd3af08d124a104005ac48e67da4155a8b071b980b1d12c35af3f4a008ba77e5b4ee3242292f6c034cb0006b5532ce69
2018-01-11[Doc] Fix link for bip 159 pull requestazuchi
2018-01-09Add address_types testPieter Wuille
Improvements and cleanups by John Newbery
2018-01-09Support downgrading after recovered keypool witness keysPieter Wuille
2018-01-09SegWit wallet supportPieter Wuille
This introduces two command line flags (-addresstype and -changetype) which control the type of addresses/outputs created by the GUI and RPCs. Certain RPCs allow overriding these (`getnewaddress` and `getrawchangeaddress`). Supported types are "legacy" (P2PKH and P2SH-multisig), "p2sh-segwit" (P2SH-P2WPKH and P2SH-P2WSH-multisig), and "bech32" (P2WPKH and P2WSH-multisig). A few utility functions are added to the wallet to construct different address type and to add the necessary entries to the wallet file to be compatible with earlier versions (see `CWallet::LearnRelatedScripts`, `GetDestinationForKey`, `GetAllDestinationsForKey`, `CWallet::AddAndGetDestinationForScript`).
2018-01-09Implicitly know about P2WPKH redeemscriptsPieter Wuille
Make CKeyStore automatically known about the redeemscripts necessary for P2SH-P2WPKH (and due to the extra checks in IsMine, also P2WPKH) spending.
2018-01-09[test] Serialize CTransaction with witness by defaultPieter Wuille
2018-01-09Support P2WPKH and P2SH-P2WPKH in dumpprivkeyPieter Wuille
2018-01-09Support P2WPKH addresses in create/addmultisigPieter Wuille
2018-01-09Fix rare failure in p2p-segwit.pySuhas Daftuar
Avoid creating very small utxos that would violate an assumption in test_non_standard_witness.
2018-01-09Sort mempool by min(feerate, ancestor_feerate)Suhas Daftuar
This more closely approximates the desirability of a given transaction for mining.
2018-01-09Refactor CompareTxMemPoolEntryByDescendantScoreSuhas Daftuar
2018-01-09Remove unused mempool indexSuhas Daftuar
2018-01-08Allow multiwallet.py to be used with --usecliRussell Yanofsky
Add test coverage for bitcoin-cli multiwallet calls.
2018-01-08[tests] allow tests to be run with --usecliJohn Newbery
test_framework accepts a new --usecli parameter. Running the test with this parameter will cause all RPCs to be sent through bitcoin-cli rather than directly over http. By default, individual test cases do not support --usecli, and self.supports_cli must be set to True in the set_test_params method. We can make supports_cli default to True in future once we know which tests will fail with use_cli.
2018-01-08TestNodeCLI batch emulationRussell Yanofsky
Support same get_request and batch methods as AuthServiceProxy
2018-01-08Prevent TestNodeCLI.args mixupsRussell Yanofsky
Change TestNodeCLI.__call__() to return a new instance instead of modifying the existing instance. This way, it's possible to create different cli objects that have their own options (for example -rpcwallet options to connect to different wallets), and options set for a single call (`node.cli(options).method(args)`) will no longer leak into future calls.
2018-01-08Improve TestNodeCLI output parsingRussell Yanofsky
Parse JSONRPCException errors, and avoid JSON decode exception if RPC method returns a plain string.
2018-01-08Remove the ending slashes from RPC URI format.Jacky C
2018-01-06Merge #12079: Improve prioritisetransaction test coverageMarcoFalke
7f67dd0aa6 [qa] Improve prioritisetransaction functional test (João Barbosa) Pull request description: Tree-SHA512: 7a5c446772069cd9ace085ae2635e1f61870c597e2216614628f4b6ebfe209b29f381a182a6f60d09f43f22bb82b59bb573b5441fa8e7b958a5fd0d5aad80d86
2018-01-06Merge #10677: RPC Docs: addmultisigaddress is intended for non-watchonly ↵Pieter Wuille
addresses 73041c3c99 RPC Docs: addmultisigaddress is intended for non-watchonly addresses (Gregory Sanders) Pull request description: Spent a couple hours debugging why my p2sh watchonly funds were not appearing in various accounting calls when address was imported via `addmultisigaddress`. Tree-SHA512: 0673e276e5ca8cdc4c9357bd835a29bd5a994520a78179600944932c700917142930288bf179f5e89b0874beaf1a88bd70129f3a297a46df42a10bab847017bb
2018-01-05Merge #12092: [qt] Replaces numbered place marker %2 with %1.MarcoFalke
8a93543419 Replaces numbered place marker %2 with %1. (251) Pull request description: This PR closes #12015 in which @chen610620 suggests to replace numbered place marker `%2` with `%1`. Calling member function`QString::arg()` on a `QString` object with one arbitrary numbered place marker within the range [1,99] works, because `QString::arg()` replaces the _lowest_ numbered place marker in the `QString` object it is called on. [QString::arg documentation:](http://doc.qt.io/qt-5/qstring.html#arg) > Returns a copy of this string with the lowest numbered place marker replaced by string a, i.e., %1, %2, ..., %99. I suspect that the `%2` marker is just an unfortunate typo or the remainder of a string that used to have multiple numbered place markers. This PR replaces the numbered place marker `%2` with `%1` to avoid any confusion in the future. Tree-SHA512: 0bb40cf3b9824e1eeba0a184e72358b30d20e8261e12deb287155b7cc8317ad0b0787ef1d0671325eb8bccc9e51b3037d737015749338c31cf400930840e56b6
2018-01-05[qa] Improve prioritisetransaction functional testJoão Barbosa
2018-01-04Merge #12093: Fix incorrect Markdown linkJonas Schnelli
4aa64557b Fix incorrect Markdown link (practicalswift) Pull request description: Fix incorrect Markdown link. Tree-SHA512: c6c4e4ddf215fdffa49aa55aed590656356bb7e898b2843a7a6c669eff9f401fe4772a9298893e9fe7f7bc5ea25f7dd87f792241c09e4cd83e7609633556a5bb
2018-01-04Fix incorrect Markdown linkpracticalswift
2018-01-04Replaces numbered place marker %2 with %1.251
Replaces numbered place marker %2 with %1, because the QString::arg() member function is called once on the string used to create the QString object.
2018-01-04Merge #11997: [tests] util_tests.cpp: actually check ignored argsMarcoFalke
c99a3c32c8 [tests] util_tests.cpp: actually check ignored args (Anthony Towns) Pull request description: An array with 7 elements was setup for checking argument parsing, but was passed to ParseParamaeters with argc=5, meaning the interpretation of the last two arguments was never actually checked. Tree-SHA512: 7b81fde49742e524f1bb67e2ec084f5909ae36125f237f0210df4587c62e5a5a8f277f13543f0a85ad145c4bb80d62339a7d50d7ed41659df318c8198ea7f428
2018-01-04Merge #12063: [Trivial] Update license year range to 2018MarcoFalke
c9439e735a [Trivial] Update license year range to 2018 (Akira Takizawa) Pull request description: The same as #9617. Happy new year! :smiley: Tree-SHA512: 4b8fe343bf841da12157595bb51b59ac8e5cfa8ceb5910a499f26cff35c7ef8420dbf3ad8e5dd9f4225441e2fecff7fc6939f1a55f98ea51b57e420d326bda47
2018-01-04Merge #12001: [RPC] Adding ::minRelayTxFee amount to getmempoolinfo and ↵Wladimir J. van der Laan
updating help aad3090 [rpc] Adding ::minRelayTxFee amount to getmempoolinfo and updating mempoolminfee help description (Jeff Rade) Pull request description: These are RPC document changes from #11475 which is now merged. Took into consideration comments from #11475 and #6941 for this PR. Biggest change here is when calling `getmempoolinfo`, will now show the `minrelaytxfee` in the JSON reponse (see below): ``` $ bitcoin-cli getmempoolinfo { "size": 50, "bytes": 13102, "usage": 70480, "maxmempool": 300000000, "mempoolminfee": 0.00001000, "minrelaytxfee": 0.00001000 } ``` Fixes #8953 Tree-SHA512: 5ca583961365ee1cfe6e0d19afb0b41d542e179efee3b3c5f3fcf7d3ebca9cc3eedfd1434a0da40c5eed84fba98b35646fda201e6e61c689b58bee9cbea44b9e
2018-01-03Merge #12035: [qt] change µBTC to bitsJonas Schnelli
ebcee1de2 bips: add bip176 (Bits Denomination) (William Casarin) 275b2eeed [qt] change µBTC to bits (William Casarin) Pull request description: Now that we have bip176, change "µBTC" to the more colloquial "bits" Tree-SHA512: eba5e5f89c392728a4f0a3bd81a9779a117b8d72a490390fd031d4e7cc56c2bfee0016aba7ef9535903e8cf2262ce46497283424e378906d0e3bf5b0d2d981c7
2018-01-03Merge #12074: [qt] Optimizes boolean expression model && model->haveWatchOnly()Jonas Schnelli
6dda059bd [qt] Simplifies boolean expression model && model->haveWatchOnly() (251) Pull request description: This PR optimizes the boolean expression `model && model->haveWatchOnly()` to `model->haveWatchOnly()`. The boolean expression can be optimized because the method `TransactionView::exportClicked` already guards against a potential dereferenced null pointer by returning early if `model` is null. https://github.com/bitcoin/bitcoin/blob/63a4dc10876bfc61c2e87d35dcf17da2f0f8c316/src/qt/transactionview.cpp#L351-L353 Tree-SHA512: 8bdd0d05bf879745fa39d3ca7524471720ae08ceee9427d5a08776e7b56d18542ae87a6991cd6779e232305f504fdfc77223702b72ecbe231f5f5e98453456dd
2018-01-03Adding test case for SINGLE|ANYONECANPAY hash type in tx_valid.jsonChris Stewart
2018-01-03Merge #12075: [scripts] Add missing univalue file to copyright_header.pyMarcoFalke
415f86c6ae [scripts] Add missing univalue file to copyright_header.py (fanquake) Pull request description: This needs to be added so that PRs like #12062 don't modify the subtree. Tree-SHA512: 3642bdb0c8271ae700857a79fa5800b0c26c4b3f126d4406f224293817fb74d498fa1fc581d576ae747fbbb6952d4369fc4ab823ab48fd0946c1e8ccbe93cee6