aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-09-02Merge #16185: gettransaction: add an argument to decode the transactionMeshCollider
9965940e35c445ccded55510348af228ff22f0e9 doc: Add release note for the new gettransaction argument (darosior) b8b3f0435a2837d3897e9e232ef6ca839ce74eb8 tests: Add a new functional test for gettransaction (darosior) 7f3bb247a811582d1aa4805d8e601c19808dc7ba gettransaction: add an argument to decode the transaction (darosior) Pull request description: This PR adds a new parameter to the `gettransaction` call : `decode`. If set to `true`, it will add a new `decoded` field to the response. This mimics the behavior of `getrawtransaction`'s `verbose` argument to avoid using 2 calls if we want to decode a wallet transaction (`gettransaction` then `decoderawtransaction`). Fix #16181 . ACKs for top commit: meshcollider: re-utACK 9965940e35c445ccded55510348af228ff22f0e9 Tree-SHA512: bcb6b4bd252b3488d6afc77659c499c2ad99fd58661eb24b6a2e17014c74f22e47fde70e00fedb4f4754915786622ad02483b2cf2c4dea0ab0eb4ac8276dbeee
2019-09-02Merge #13868: Remove unused fScriptChecks parameter from CheckInputsfanquake
9b92538adebd30353ffc1a427bc20ab0c3fc75f1 Remove unused fScriptChecks parameter from CheckInputs (Matt Corallo) Pull request description: fScriptChecks = false just short-circuits the entire function, so passing it in is entirely useless. This is extracted from #13233 /cc TheBlueMatt. Recommend reviewing with `git show --ignore-all-space`, i.e.: https://github.com/bitcoin/bitcoin/pull/13868/files?w=1 ACKs for top commit: TheBlueMatt: utACK 9b92538adebd30353ffc1a427bc20ab0c3fc75f1. Checked diff had no functional change and new comment copy looks correct. kallewoof: ACK 9b92538adebd30353ffc1a427bc20ab0c3fc75f1 ajtowns: ACK 9b92538adebd30353ffc1a427bc20ab0c3fc75f1 ; code review, checked tests work. Looks right to me, and fanquake's notes make sense. Could change the coinbase early exit to `assert(!tx.IsCoinBase());`. fanquake: ACK 9b92538adebd30353ffc1a427bc20ab0c3fc75f1 - Notes / testing below. Tree-SHA512: add253a3e8cf4b33eddbc49efcec333c14b5ea61c7d34e43230351d40cff6adc919a75b91c72c4de8647a395284db74a61639f4c67848d4b2fec3a705b557790
2019-09-01Merge #16720: qt: Replace objc_msgSend() function calls with the native ↵fanquake
Objective-C syntax 0bb33b5348dbddd65b88a7f00449c965562355d3 qt: Replace objc_msgSend with native syntax (Hennadii Stepanov) Pull request description: Changes in Xcode 11 Objective-C Runtime cause an error (#16387) during building on MacOS 10.15 Catalina. This PR fixes this issue by replacing `objc_msgSend()` function calls with the native Objective-C syntax. Refs: - [changes in `objc_msgSend` function](https://developer.apple.com/documentation/objectivec/1456712-objc_msgsend?changes=latest_minor&language=objc) - [`OBJC_OLD_DISPATCH_PROTOTYPES` macro](https://developer.apple.com/documentation/objectivec/objc_old_dispatch_prototypes?language=objc) ACKs for top commit: l2a5b1: ACK 0bb33b5 - Diff looks good. Sending messages via native Objective-C code feels more robust and is more readable than casting all the `objc_msgSend` function calls to the appropriate function signature (which would also have fixed the issue). jonasschnelli: utACK 0bb33b5348dbddd65b88a7f00449c965562355d3 - Confirmed that the called macOS framework function is available on our build targets. fanquake: ACK 0bb33b5348dbddd65b88a7f00449c965562355d3 - Still works as expected. Tree-SHA512: c09cb684d06bd1da053a17c182b7bb1642e45bb347d26c76e1c5d835c320567caee366d85e34bb7f2be38e63ed041e0d06a56c2a9d89f7e5bece9b19cc5c6772
2019-08-31qt: Replace objc_msgSend with native syntaxHennadii Stepanov
2019-08-31Merge #16716: wallet: Use wallet name instead of pointer on unload/releasefanquake
d9d8984270dbb004ec94f8dbb289be2bc9e4dbc3 wallet: Use wallet name instead of pointer on unload/release (João Barbosa) Pull request description: Fixes #16668. Wallet name is unique so it can be used instead of pointer. ACKs for top commit: meshcollider: utACK d9d8984270dbb004ec94f8dbb289be2bc9e4dbc3 instagibbs: utACK https://github.com/bitcoin/bitcoin/pull/16716/commits/d9d8984270dbb004ec94f8dbb289be2bc9e4dbc3 ryanofsky: utACK d9d8984270dbb004ec94f8dbb289be2bc9e4dbc3. Alternately I think it might be possible to use an intptr_t set instead of a string set to get around the undefined behavior described in the issue. Tree-SHA512: eccd4d260cd4c02b52c30deeb32dbfd190a1151a5340eb3aa4ece0dc6ae3b3ed746ce5617336461f6f27c437c435629cd07d20beb1c5450f23b75edde6728598
2019-08-30gettransaction: add an argument to decode the transactiondarosior
This adds a new boolean parameter 'decode' to the gettransaction call, which, if set to true, add a 'decoded' field to the result containing the decoded transaction
2019-08-30Merge #16758: qt: Replace QFontMetrics::width() with TextWidth()fanquake
8b6f5aabb9b21bea875170ae0f49661a4e38dbd3 qt: Replace QFontMetrics::width() with TextWidth() (Hennadii Stepanov) Pull request description: Compiling master (d8fc9979130a268cf55b12c223b20fd7d4b9f67f) on macOS Catalina (with a patch from #16720) reveals one more instance of `QFontMetrics::width()` which is supposed to be replaced with `TextWidth()` in the merged #16701. Sorry for incomplete solution provided in #16701. It’s especially sad that the line I missed lies in only 7 lines from the code touched in #16701. ACKs for top commit: fanquake: ACK 8b6f5aabb9b21bea875170ae0f49661a4e38dbd3 Tree-SHA512: 65cd8bea550150e5ee47c1e906d8c2393547cf4feba3701a933a4f24fad5ecdb552ac2de4e1200ed14efaa0df0480150dd58fccbddc3b902f6c2141603874902
2019-08-30Merge #16753: wallet: extract PubKey from P2PK script with Solverfanquake
798a589aff64b83a0844688a661f4bd987c3340c wallet: extract PubKey from P2PK script with Solver (Sebastian Falbesoner) Pull request description: The function `ExtractPubKey()` checks if a given script matches the P2PK pattern (`<PubKey> OP_CHECKSIG`), extracts the PubKey and additionally checks if it is cryptographically valid (full validation with ECC library via `CPubKey::IsFullyValid()`). Currently this is done manually in the following order: 1. check if first script OP is data push with valid PubKey length (first part of pattern match), extract PubKey 2. create `CPubKey` object with extracted PubKey 3. fully validate public key 4. check if last script OP is `OP_CHECKSIG` (second part of pattern match) Using Solver, the pattern matching and PubKey extraction can be done via a single step, leading to the following simplified order with shorter code: 1. check if given script matches P2PK pattern with Solver (also contains valid PubKey length check), extracts Pubkey 2. create `CPubKey` object with extracted Pubkey 3. fully validate public key ACKs for top commit: instagibbs: utACK https://github.com/bitcoin/bitcoin/pull/16753/commits/798a589aff64b83a0844688a661f4bd987c3340c theStack: > utACK [798a589](https://github.com/bitcoin/bitcoin/commit/798a589aff64b83a0844688a661f4bd987c3340c) sipa: ACK 798a589aff64b83a0844688a661f4bd987c3340c achow101: Code Review ACK 798a589aff64b83a0844688a661f4bd987c3340c Tree-SHA512: 350358a89afed8c2a7967c50e9714a2d4a909259b50e694ce68dde3e7d0fa0bf3238d33642e73f2bdb53860f6d3f7327ca3eb6426b74eaffacfbca0a384d68cd
2019-08-30Merge #14862: doc: Declare BLOCK_VALID_HEADER reservedfanquake
fa0b910486e9aada077fe47e1201dcb3bd523c87 [doc] chain: Declare BLOCK_VALID_HEADER reserved (MarcoFalke) Pull request description: `BLOCK_VALID_HEADER` was never used and the comment is confusing to me in several ways: * It claims "version ok". However, without the previous header, it is not possible to check the validity of the version since the height needs to be known (c.f. BIP 90) * It claims "hash satisfies claimed PoW". While it is possible to check against the claimed PoW, it is not possible without the previous header to check that the claimed PoW is itself valid. * It claims "1 <= vtx count <= max". However, with the header alone and current consensus rules, the number of transactions is unknown. ACKs for top commit: sipa: ACK fa0b910486e9aada077fe47e1201dcb3bd523c87 ryanofsky: ACK fa0b910486e9aada077fe47e1201dcb3bd523c87 Tree-SHA512: 3972995a0a2f83aa55767bf8982af1fcb9493483f62aee6df27e58be9181a48d5968ae718b390cecc8be3ed4f26495683b1cffde8ef272dea0bd610ec169ef8b
2019-08-29Merge #16707: qt: Remove obsolete QModelIndex::child()Jonas Schnelli
c53667764ea65c0f8661358759b0124f808ce587 qt: Remove obsolete QModelIndex::child() (Hennadii Stepanov) Pull request description: The `QModelIndex::child()` member function is [obsolete](https://doc.qt.io/qt-5.12/qmodelindex-obsolete.html) since Qt 5.12. This PR removes it, does not change behavior and keeps compatibility with [Qt 5.5.1](https://github.com/bitcoin/bitcoin/pull/15393). Here is an excerpt from the master build log: ``` qt/receivecoinsdialog.cpp: In member function ‘void ReceiveCoinsDialog::copyColumnToClipboard(int)’: qt/receivecoinsdialog.cpp:264:111: warning: ‘QModelIndex QModelIndex::child(int, int) const’ is deprecated: Use QAbstractItemModel::index [-Wdeprecated-declarations] GUIUtil::setClipboard(model->getRecentRequestsTableModel()->data(firstIndex.child(firstIndex.row(), column), Qt::EditRole).toString()); ^ In file included from /home/hebasto/Qt/5.13.0/gcc_64/include/QtWidgets/qabstractitemview.h:45:0, from /home/hebasto/Qt/5.13.0/gcc_64/include/QtWidgets/qheaderview.h:44, from /home/hebasto/Qt/5.13.0/gcc_64/include/QtWidgets/QHeaderView:1, from ./qt/guiutil.h:12, from ./qt/receivecoinsdialog.h:8, from qt/receivecoinsdialog.cpp:7: /home/hebasto/Qt/5.13.0/gcc_64/include/QtCore/qabstractitemmodel.h:457:20: note: declared here inline QModelIndex QModelIndex::child(int arow, int acolumn) const ^~~~~~~~~~~ ``` ACKs for top commit: laanwj: Code review ACK c53667764ea65c0f8661358759b0124f808ce587 promag: ACK c53667764ea65c0f8661358759b0124f808ce587, just read the change. jonasschnelli: utACK c53667764ea65c0f8661358759b0124f808ce587 Tree-SHA512: 99fcb6ff60a6d47b925bda9f14006269eaad09ba4f7a41ac4975c6cf04bd906b58aed721cbfa0be7da8e6613d92e30d4be18b7e4d3960f026c7226558a4c3196
2019-08-29qt: Replace QFontMetrics::width() with TextWidth()Hennadii Stepanov
2019-08-29Merge #16695: rpc: Add window final block height to getchaintxstatsWladimir J. van der Laan
d48c1e837ae1bd08e0f18ad1b57ff72675c3d6ad Add window final block height to getchaintxstats (Jonathan "Duke" Leto) Pull request description: This patch is motivated by the desire to make the output of `getchaintxstats` more useful and optimized for applications to consume and render the data. Firstly, this data is already available to the RPC, no additional work is done. Currently additional RPC calls will be needed to look up the height of the final block in the window or the block height that began the window. By adding the block height of the final block in the window, the JSON is "self-contained" and applications can calculate the exact block height range of the window with no additional RPC requests. For example, a web application which wants to render historical information for `getchaintxstats` RPC on various window sizes might call the RPC with various window lengths, once per day, and store the JSON results somewhere. Because the final block height of each dataset is included, it's no extra work to determine the exact block window range of each JSON response. ACKs for top commit: promag: ACK d48c1e837ae1bd08e0f18ad1b57ff72675c3d6ad. Tree-SHA512: fd4952c125f81a4ad18f7c78498c6b3e265b93cb574832166ac25596321ce84957f971f3f78f37d7e42638dc65f2a5d4d760f289873c9c2f2a82eb00a0f87c3f
2019-08-29Merge #16706: qt: Replace deprecated QSignalMapper by lambda expressionsWladimir J. van der Laan
091213403922e970b38cc3a98c11074e02ddba14 qt: Remove QSignalMapper from TransactionView (Hennadii Stepanov) 9e0c1d676c5892fb5bd8fe98781915506a25108f qt: Remove QSignalMapper from RPCConsole (Hennadii Stepanov) Pull request description: The [`QSignalMapper`](https://doc.qt.io/qt-5/qsignalmapper.html) class has been [deprecated](https://doc-snapshots.qt.io/qt5-5.10/obsoleteclasses.html) since Qt 5.10. This PR replaces it by lambdas and does not change behavior. ACKs for top commit: jonasschnelli: utACK 091213403922e970b38cc3a98c11074e02ddba14 Tree-SHA512: 0c102d5cab4adc8b6252f72e07123ac87c65434c88cada3e72816ecea8fc4803f15b9c050fb5e1c7e8a96f709265521fd6813ab1890dbf5634032f7ee0d50675
2019-08-29Merge #15615: Add log output during initial header syncWladimir J. van der Laan
d75e704ac08fb43320e3ebcdde0d2a5392fdec9f Add log output during initial header sync (Jonas Schnelli) Pull request description: The non debug log output is completely quiet during the header sync. I see two main reasons to add infos about the state of the initial header sync... * users may think the node did fail to start sync * it's a little complicate to check if your getting throttled during header sync (repeatedly calling `getchaintips` or similar) ACKs for top commit: fanquake: Concept ACK https://github.com/bitcoin/bitcoin/pull/15615/commits/d75e704ac08fb43320e3ebcdde0d2a5392fdec9f practicalswift: utACK d75e704ac08fb43320e3ebcdde0d2a5392fdec9f laanwj: Tested ACK d75e704ac08fb43320e3ebcdde0d2a5392fdec9f Tree-SHA512: 2e738571b703d7251290864603c3a829729645962c2fa3187250bab0585e66a5f01fce892e9b5b98da451fab2b40a2e4784f9b2e5a9cad75ff62c535affe7430
2019-08-29Add window final block height to getchaintxstatsJonathan "Duke" Leto
The getchaintxstats RPC now returns the additional key of window_final_block_height
2019-08-29Merge #16701: qt: Replace functions deprecated in Qt 5.13Wladimir J. van der Laan
c6dd32da697e5a8052cbabe8c7605d27c43a8dfb qt: Replace obsolete functions of QDesktopWidget (Hennadii Stepanov) 1260ecd812e35185898fd555ad3e01d019072bcf qt: Add TextWidth() wrapper (Hennadii Stepanov) Pull request description: The following functions are obsolete in Qt 5.13: - [`QFontMetrics::width()`](https://doc.qt.io/qt-5/qfontmetrics-obsolete.html#width) - [`QDesktopWidget::availableGeometry()`](https://doc.qt.io/qt-5/qdesktopwidget-obsolete.html#availableGeometry) - [`QDesktopWidget::screenGeometry()`](https://doc.qt.io/qt-5/qdesktopwidget-obsolete.html#screenGeometry) This PR replaces them and does not change behavior. Here are some excerpts from the master build log: ``` qt/bitcoingui.cpp: In constructor ‘BitcoinGUI::BitcoinGUI(interfaces::Node&, const PlatformStyle*, const NetworkStyle*, QWidget*)’: qt/bitcoingui.cpp:84:57: warning: ‘const QRect QDesktopWidget::availableGeometry(int) const’ is deprecated: Use QGuiApplication::screens() [-Wdeprecated-declarations] move(QApplication::desktop()->availableGeometry().center() - frameGeometry().center()); ^ In file included from /home/hebasto/Qt/5.13.0/gcc_64/include/QtWidgets/QDesktopWidget:1:0, from qt/bitcoingui.cpp:43: /home/hebasto/Qt/5.13.0/gcc_64/include/QtWidgets/qdesktopwidget.h:88:67: note: declared here QT_DEPRECATED_X("Use QGuiApplication::screens()") const QRect availableGeometry(int screen = -1) const; ^~~~~~~~~~~~~~~~~ ``` ``` qt/bitcoingui.cpp:1410:74: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] max_width = qMax(max_width, fm.width(BitcoinUnits::longName(unit))); ^ In file included from /home/hebasto/Qt/5.13.0/gcc_64/include/QtWidgets/qwidget.h:50:0, from /home/hebasto/Qt/5.13.0/gcc_64/include/QtWidgets/qdialog.h:44, from /home/hebasto/Qt/5.13.0/gcc_64/include/QtWidgets/QDialog:1, from ./qt/optionsdialog.h:8, from ./qt/bitcoingui.h:12, from qt/bitcoingui.cpp:5: /home/hebasto/Qt/5.13.0/gcc_64/include/QtGui/qfontmetrics.h:108:9: note: declared here int width(const QString &, int len = -1) const; ^~~~~ ``` ``` qt/splashscreen.cpp: In constructor ‘SplashScreen::SplashScreen(interfaces::Node&, Qt::WindowFlags, const NetworkStyle*)’: qt/splashscreen.cpp:127:50: warning: ‘const QRect QDesktopWidget::screenGeometry(int) const’ is deprecated: Use QGuiApplication::screens() [-Wdeprecated-declarations] move(QApplication::desktop()->screenGeometry().center() - r.center()); ^ In file included from /home/hebasto/Qt/5.13.0/gcc_64/include/QtWidgets/QDesktopWidget:1:0, from qt/splashscreen.cpp:24: /home/hebasto/Qt/5.13.0/gcc_64/include/QtWidgets/qdesktopwidget.h:79:67: note: declared here QT_DEPRECATED_X("Use QGuiApplication::screens()") const QRect screenGeometry(int screen = -1) const; ^~~~~~~~~~~~~~ ``` ACKs for top commit: jonasschnelli: utACK c6dd32da697e5a8052cbabe8c7605d27c43a8dfb Tree-SHA512: deb7bcbf86e1dcc6508bd91288772c2fe8811db79fa2011de37d0469cdd094fbf7fd8c4512c607bed0bd08dc2968e893c0bbc190732c43c69ed1085259df766c
2019-08-29wallet: extract PubKey from P2PK script with SolverSebastian Falbesoner
The function ExtractPubKey() checks if a given script matches the P2PK pattern (<PubKey> OP_CHECKSIG), extracts the PubKey and additionally checks if it is cryptographically valid (full validation with ECC library via .IsFullyValid()). Currently this is done manually in the following order: 1) check if first script OP is data push with valid PubKey length (first part of pattern match), extract PubKey 2) create CPubKey object with extracted PubKey 3) fully validate public key 4) check if last script OP is OP_CHECKSIG (second part of pattern match) Using Solver, the pattern matching and PubKey extraction can be done via a single step, leading to the following simplified order with shorter code: 1) check if given script matches P2PK pattern with Solver (also contains valid PubKey length check), extracts Pubkey 2) create CPubKey object with extracted Pubkey 3) fully validate public key
2019-08-29Merge #16752: doc: Delete stale URL in test READMEfanquake
41d484d5c88f057e75cfdd8b88587b9a12a61744 doc: Delete stale URL in test README (Michael Folkson) Pull request description: The resource on the Boost unit test framework previously linked to in src/test/README.md was a stale URL. Instead of deleting it, I've replaced it with an alternative resource on the framework on [boost.org](https://www.boost.org/doc/libs/1_45_0/libs/test/doc/html/utf/tutorials.html). ACKs for top commit: promag: ACK 41d484d5c88f057e75cfdd8b88587b9a12a61744. hebasto: ACK 41d484d5c88f057e75cfdd8b88587b9a12a61744, the removed link is really obsolete. fanquake: ACK 41d484d5c88f057e75cfdd8b88587b9a12a61744 - Thanks. Tree-SHA512: 764f12548441bde615f77b7a2ca7c5188b4ab936972d16b84960fbd8604d4cbd224415bc59ce839e7e63293aa84fd97f31a69e38734e531231cdb0e148d2e1bd
2019-08-29Merge #16708: qt: Replace obsolete functions of QSslSocketWladimir J. van der Laan
2e1455c4a100170c322165af3ecbbcd3004b2f9d Replace obsolete functions of QSslSocket (Hennadii Stepanov) Pull request description: The [`QSslSocket::setDefaultCaCertificates()`](https://doc.qt.io/qt-5/qsslsocket-obsolete.html#setDefaultCaCertificates) and [`QSslSocket::systemCaCertificates()`](https://doc.qt.io/qt-5/qsslsocket-obsolete.html#systemCaCertificates) member functions are [obsolete](https://doc.qt.io/qt-5.12/qsslsocket-obsolete.html) since Qt 5.12. This PR replaces them, does not change behavior and keeps compatibility with [Qt 5.5.1](https://github.com/bitcoin/bitcoin/pull/15393). ACKs for top commit: laanwj: ACK 2e1455c4a100170c322165af3ecbbcd3004b2f9d promag: ACK 2e1455c4a100170c322165af3ecbbcd3004b2f9d. Tree-SHA512: 4182cd22a3e7a998d62a0fe84e748803a6962a65920b74da9fcf5666a700507468bb6e428054ccb70c2fbb7969a56933f450bc405c7a32ecbc1f8af4c1f983a3
2019-08-29doc: Delete stale URL in test READMEMichael Folkson
2019-08-28Merge #14879: qt: Add warning messages to the debug windowMarcoFalke
593ba696fb32da558091ac02ad87c4893db4ce97 Add warning messages to the debug window (Hennadii Stepanov) Pull request description: Fix: #11016 This PR adds warning messages to the debug window in `-disablewallet` mode. ![screenshot from 2018-12-06 01-01-27](https://user-images.githubusercontent.com/32963518/49550070-413c1c80-f8f3-11e8-9865-efb49ea8da45.png) ACKs for top commit: jonasschnelli: utACK 593ba696fb32da558091ac02ad87c4893db4ce97 promag: ACK 593ba696fb32da558091ac02ad87c4893db4ce97, agree with @Sjors https://github.com/bitcoin/bitcoin/pull/14879#pullrequestreview-196433092 above. ryanofsky: utACK 593ba696fb32da558091ac02ad87c4893db4ce97 Tree-SHA512: a8ca78529bb16813ba7bfaf5ccd4349189979f08e78ea857746a6fb00fd9d7ed98d8f06f384830acba21dac57070060af23f6be8249398feb32a6efff1333de8
2019-08-27Merge #16728: move-only: move coins statistics utils out of RPCMarcoFalke
8a3b2eb17572ca2131778d52cc25ec359470a90f move-only: move coins statistics utils out of RPC (James O'Beirne) Pull request description: This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11): Parent PR: #15606 Issue: #15605 Specification: https://github.com/jamesob/assumeutxo-docs/tree/master/proposal --- In the short-term, this move-only commit will help with fuzzing (https://github.com/bitcoin/bitcoin/pull/15606#issuecomment-524482297). Later, these procedures will be used to compute statistics (particularly a content hash) for UTXO sets coming in from snapshots. Most easily reviewed with `git ... --color-moved=dimmed_zebra`. A nice follow-up would be adding unittests, which I'll do if nobody else gets around to it. ACKs for top commit: MarcoFalke: ACK 8a3b2eb17572ca2131778d52cc25ec359470a90f, checked --color-moved=dimmed-zebra Tree-SHA512: a187d2f7590ad2450b8e8fa3d038c80a04fc3d903618c24222d7e3172250ce51badea35860c86101f2ba266eb4354e6efb8d7d508b353f29276e4665a1efdf74
2019-08-27move-only: move coins statistics utils out of RPCJames O'Beirne
These procedures will later be used in the ChainstateManager to compute statistics (particularly a content hash) for UTXO sets coming in from snapshots.
2019-08-26Remove unused fScriptChecks parameter from CheckInputsMatt Corallo
fScriptChecks = false just short-circuits the entire function, so passing it in is entirely useless.
2019-08-26Support serialization of std::vector<bool>Pieter Wuille
2019-08-25qt: Remove QSignalMapper from TransactionViewHennadii Stepanov
The QSignalMapper class is obsolete since Qt 5.10.
2019-08-25qt: Replace obsolete functions of QDesktopWidgetHennadii Stepanov
2019-08-25qt: Remove obsolete QModelIndex::child()Hennadii Stepanov
The QModelIndex::child() member function is obsolete since Qt 5.12.
2019-08-25wallet: Use wallet name instead of pointer on unload/releaseJoão Barbosa
2019-08-24[Doc] Add documentation for the new whitelist permissionsnicolas.dorier
2019-08-24Replace obsolete functions of QSslSocketHennadii Stepanov
The QSslSocket::setDefaultCaCertificates() and QSslSocket::systemCaCertificates() member functions are obsolete since Qt 5.12.
2019-08-24qt: Remove QSignalMapper from RPCConsoleHennadii Stepanov
The QSignalMapper class is obsolete since Qt 5.10.
2019-08-23qt: Add TextWidth() wrapperHennadii Stepanov
In Qt 5.12 and before the QFontMetrics::width() is used and it is deprecated since Qt 13.0. In Qt 5.11 the QFontMetrics::horizontalAdvance() was introduced.
2019-08-23gui: Ensure tx send error highlight is visiblebpay
If sending to multiple recipients and one of the recipient fields is malformed, the highlighted field may not be visible due to being scrolled out of view, leading to a confusing lack of error feedback when clicking Send. To avoid this problem ensure the first field containing an error is scrolled into view when Send is clicked.
2019-08-23Merge #16677: gui: remove unused PlatformStyle::TextColorIconJonas Schnelli
bca388db0da3d40953ff65d03da62ca45a7951a6 gui: remove unused PlatformStyle::TextColorIcon (fanquake) Pull request description: This is unused after #16612. ACKs for top commit: emilengler: Concept ACK bca388d practicalswift: ACK bca388db0da3d40953ff65d03da62ca45a7951a6 -- diff looks correct & less cruft is better hebasto: ACK bca388db0da3d40953ff65d03da62ca45a7951a6, I have reviewed the code and it looks OK, I agree it can be merge. jonasschnelli: utACK bca388db0da3d40953ff65d03da62ca45a7951a6 Tree-SHA512: ae5c5cfc02cf2e6f138e75e227320f4c430b93bd529a8ead7ba971ceb5bbc997cdb721c6fd8a46a5a897008f0bc6e519422d6beef240b9d2e28ecf4f8cbbcc6a
2019-08-23Merge #16570: tests: Make descriptor tests deterministicfanquake
b9ee63c71b751fd67da777774ea8c0b27e7db2f8 Make descriptor test deterministic (David Reikher) Pull request description: This is an improvement to a test, inspired by #14343 - removing non determinism from a test. The test `descriptor_test` is non-deterministic, as it relies on the `MaybeUseHInsteadOfApostrophy` function which randomly either swaps all apostrophes with 'h' or doesn't at all in a descriptor. This fix makes both cases always run, if an apostrophe is found in a test descriptor. This does not reduce test coverage but removes the non-determinism. Additionally, the `MaybeUseHInsteadOfApostrophy` function removed the checksum if found at the end of a descriptor when the apostrophes are swapped by 'h's, since after being swapped the checksum is no longer correct. I instead added re-calculation of the checksum using the `DescriptorChecksum` function, which adds coverage for the case of a descriptors having 'h's instead of apostrophes and a checksum. This was previously lacking. To achieve this I had to move `DescriptorChecksum` and `PolyMod` out of the anonymous namespace in descriptor.cpp to make `DescriptorChecksum` accessible in descriptor_tests.cpp. All tests complete successfully (functional as well as unit tests). ACKs for top commit: achow101: Code Review ACK b9ee63c71b751fd67da777774ea8c0b27e7db2f8 Tree-SHA512: 992c73a6644a07bfe7c72301ee2666f3c4845a012aaedd7a099a05cea8bdac84fa8280b28e44a7856260c00c0be1a6f1b6768f5694c2a22edf4c489e53fec424
2019-08-22Merge #16670: util: Add Join helper to join a list of stringsMarcoFalke
faebf6271467048dc8a9a0c526a0f8565023a966 rpc: Use Join helper in rpc/util (MarcoFalke) fa8cd6f9c13319baca467864661982a3dfb2320c util: Add Join helper to join a list of strings (MarcoFalke) Pull request description: We have a lot of enumerations in the code and sometimes those enumerations need to be mentioned in the RPC or command line documentation. Previously, each caller would have a couple of lines inline to join the strings or the joined string is hardcoded in the documentation. A helper to join strings would make code such as https://github.com/bitcoin/bitcoin/pull/16629#discussion_r315852446 less verbose and easier to read. Also, warnings commonly accumulate in complex RPCs, since a warning doesn't lead to an early return. A helper to join those warnings would make code such as https://github.com/bitcoin/bitcoin/pull/16394/files#r309324997 less verbose and easier to read. ACKs for top commit: practicalswift: ACK faebf6271467048dc8a9a0c526a0f8565023a966 Tree-SHA512: 80f2db86a05c63b686f510585c1c631250271a8958fd71fafaac91559ffd2ec25d609bf7d53412ba27f87eff5893ac9dd9c2f296fc0c73581556e1d6a734a36f
2019-08-22Merge #16674: refactor: remove obsolete qt algorithm usagefanquake
153d9dd9acffa95bb97a4b1579bd20237fdc9c52 refactor: replace qLowerBound & qUpperBound with std:: upper_bound & lower_bound (fanquake) 59373e3e94015316bcaa03a7b9c2e6f442641720 refactor: replace qSort with std::sort (fanquake) fea33cbbdfb4673033f3414bf1613591ff654aac refactor: replace qStableSort with std::stable_sort (fanquake) Pull request description: `qStablesort`, `qSort`, `qLowerBound` and `qUpperBound` have been marked as obsolete since at least Qt 5.9: [Obsolete Members for QtAlgorithms](https://doc.qt.io/qt-5.9/qtalgorithms-obsolete.html). This pull request replaces their usage with the suggested `std::` replacements. This also removes some warning spam when compiling against newer Qt (5.13.0 via brew): ```bash CXX qt/libbitcoinqt_a-walletcontroller.o qt/transactiontablemodel.cpp:96:52: warning: 'qLowerBound<QList<TransactionRecord>::iterator, uint256, TxLessThan>' is deprecated: Use std::lower_bound [-Wdeprecated-declarations] QList<TransactionRecord>::iterator lower = qLowerBound( qt/transactiontablemodel.cpp:98:52: warning: 'qUpperBound<QList<TransactionRecord>::iterator, uint256, TxLessThan>' is deprecated: Use std::upper_bound [-Wdeprecated-declarations] QList<TransactionRecord>::iterator upper = qUpperBound( ``` ```bash CXX qt/libbitcoinqt_a-moc_walletcontroller.o qt/bantablemodel.cpp:64:13: warning: 'qStableSort<QList<CCombinedBan>::iterator, BannedNodeLessThan>' is deprecated: Use std::stable_sort [-Wdeprecated-declarations] qStableSort(cachedBanlist.begin(), cachedBanlist.end(), BannedNodeLessThan(sortColumn, sortOrder)); ``` ```bash CXX qt/libbitcoinqt_a-sendcoinsentry.o qt/recentrequeststablemodel.cpp:205:5: warning: 'qSort<QList<RecentRequestEntry>::iterator, RecentRequestEntryLessThan>' is deprecated: Use std::sort [-Wdeprecated-declarations] qSort(list.begin(), list.end(), RecentRequestEntryLessThan(column, order)); ``` ACKs for top commit: hebasto: ACK 153d9dd9acffa95bb97a4b1579bd20237fdc9c52 promag: ACK 153d9dd9acffa95bb97a4b1579bd20237fdc9c52. jonasschnelli: utACK 153d9dd9acffa95bb97a4b1579bd20237fdc9c52 Tree-SHA512: 22f7290ed798ce8b0f5f313405377845d4c8e48dc8687be7464e27fff53363b451a40e9e18910a8c3b4b9d4dcc236a366c92e7d171fcb8576c48f149a1886c26
2019-08-22gui: remove unused PlatformStyle::TextColorIconfanquake
This is unused after #16612.
2019-08-22refactor: replace qLowerBound & qUpperBound with std:: upper_bound & lower_boundfanquake
2019-08-22refactor: replace qSort with std::sortfanquake
2019-08-22refactor: replace qStableSort with std::stable_sortfanquake
2019-08-21Merge #16572: wallet: Fix Char as Bool in Walletfanquake
2dbfb37b407ed23b517f507d78fb77334142dce5 Fix Char as Bool in interfaces (Jeremy Rubin) Pull request description: In a few places in src/wallet/wallet.h, we use a char when semantically we want a bool. This is kind of an issue because it means we can unserialize the same transaction with different fFromMe flags (as differing chars) and evaluate the following section in wallet/wallet.cpp ```c++ if (wtxIn.fFromMe && wtxIn.fFromMe != wtx.fFromMe) { wtx.fFromMe = wtxIn.fFromMe; fUpdated = true; } ``` incorrectly (triggering an fUpdated where both fFromMe values represent true, via different chars). I don't think this is a vulnerability, but it's just a little messy and unsemantic, and could lead to issues with stored wtxIns not being findable in a map by their hash. The serialize/unserialize code for bool internally uses a char, so it should be safe to make this substitution. NOTE: Technically, this is a behavior change -- I haven't checked too closely that nowhere is depending on storing information in this char. Theoretically, this could break something because after this change a tx unserialized with such a char would preserve it's value, but now it is converted to a ~true~ canonical bool. ACKs for top commit: achow101: Code review ACK 2dbfb37b407ed23b517f507d78fb77334142dce5 meshcollider: Code review ACK 2dbfb37b407ed23b517f507d78fb77334142dce5 Tree-SHA512: 8c0dc9cf672aa2276c694facbf50febe7456eaa8bf2bd2504f81a61052264b8b30cdb5326e1936893adc3d33504667aee3c7e207a194c71d87b3e7b5fe199c9d
2019-08-21Make descriptor test deterministicDavid Reikher
Changed MaybeUseHInsteadOfApostrophy to UseHInsteadOfApostrophe. This function now always replaces apostrophes with 'h'. The original Check function was renamed to DoCheck and it's called with an additional parameter which tells it to either leave the prv and pub arguments as is or replace the apostrophes with 'h'. The test runs with apostrophes replaced in prv only, pub only, prv and pub and without replacement at all. Replacement of apostrophes in a descriptor and then running DoCheck is conditional on whether apostrophes are found in that descriptor. Additionally, instead of dropping the checksum recalculate it after replacing apostrophes with 'h' in the function UseHInsteadOfApostrophe using the GetDescriptorChecksum function. That way, this also introduces an indirect unit test to GetDescriptoChecksum.
2019-08-20rpc: Use Join helper in rpc/utilMarcoFalke
2019-08-20util: Add Join helper to join a list of stringsMarcoFalke
2019-08-20Merge #16647: rpc: add weight to getmempoolentry outputMarcoFalke
17d178fb9463c195c822614eb0245188e52f8371 doc: add release-notes for getmempoolentry weight field addition (fanquake) 9c9cc2bd201afc7d519778cfcdeba5c81faa49f4 qa: Add RPC tests for weight in mempool entry (Daniel Edgecumbe) 54aaa7883cb61d414627248e5e410180bfd8fa67 RPC: add weight to mempool entry output (Daniel Edgecumbe) Pull request description: Rebase of #14649 (which itself was a rebase of #11256). Squash the two test related commits, and swapped out `size` usage for `vsize`. Added a commit with release notes. ACKs for top commit: emilengler: Concept ACK 17d178f instagibbs: utACK https://github.com/bitcoin/bitcoin/pull/16647/commits/17d178fb9463c195c822614eb0245188e52f8371 meshcollider: utACK 17d178fb9463c195c822614eb0245188e52f8371 Tree-SHA512: 1d354c9837e0ad0afa40325de9329b9e62688d5eab4d9e1cf9b46d8ae29d08f42d903ab37a41751c2ea8f9034231b21095881b1f5d911cb542b8b06bc85dc7cd
2019-08-19Merge #16611: build: Remove src/obj directory from repositoryWladimir J. van der Laan
b6e9ff899677770741d94f1cf4f61ebb13fc453f build: Remove src/obj directory from repository (Wladimir J. van der Laan) Pull request description: This directory is automatically created by the build process (in the build target directory, see #16588) and doesn't need to be in the repository nor in the tarballs. Move associated ignore directive to top-level `.gitignore` file. ACKs for top commit: hebasto: Concept ACK b6e9ff899677770741d94f1cf4f61ebb13fc453f Tree-SHA512: 5f3f5a0e8f19ecf925eb16cab327c3023b8512731bbaad5875828da7a25fdda1b77f6fbd06c002a383913627dc9b552f09ad27c57bcf0cb020ed3b1f506e5fef
2019-08-19Merge #15864: Fix datadir handlingMarcoFalke
ffea41f5301d5582665cf10ba5c2b9547a1443de Enable all tests in feature_config_args.py (Hennadii Stepanov) 66f5c17f8a3fe06fc65191e379ffc04e43cbbc86 Use CheckDataDirOption() for code uniformity (Hennadii Stepanov) 7e33a18a34b1a9b0f115076c142661d6d30c0585 Fix datadir handling in bitcoin-cli (Hennadii Stepanov) b28dada37465c0a773cf08b0e6766f0081bcb943 Fix datadir handling in bitcoin-qt (Hennadii Stepanov) 50824093bb2d68fe1393dfd636fab5f8795faa5d Fix datadir handling in bitcoind (Hennadii Stepanov) 740d41ce9f7fdf209366e930bd0fdcc6b1bc6b79 Add CheckDataDirOption() function (Hennadii Stepanov) c1f325126cf51d28dce8da74bfdf5cd05ab237ea Return absolute path early in AbsPathForConfigVal (Hennadii Stepanov) Pull request description: Fix #15240, see: https://github.com/bitcoin/bitcoin/issues/15240#issuecomment-487353760 Fix #15745 Fix broken `feature_config_args.py` tests (disabled by MarcoFalke@fabe28a0cdcfa13e0e595a0905e3642a960d3077). All test are enabled now. This PR is alternative to #13621. User's `$HOME` directory is not touched unnecessarily now. ~To make reviewing easier only `bitcoind` code is modified (neither `bitcoin-cli` nor `bitcoin-qt`).~ Refs: - https://github.com/bitcoin/bitcoin/issues/15745#issuecomment-479852569 by **laanwj** - #16220 Top commit has no ACKs. Tree-SHA512: 4a4cda10e0b67c8f374da0c9567003d2b566d948e7f8550fe246868b5794c15010e88ea206009480b9cd2f737f310a15e984f920730448f99a895893bed351df
2019-08-19Merge #16555: doc: mention whitelist is inbound, and applies to blocksonlyMarcoFalke
20ea9ef6ce9228a5258b99eeeeb40e6dfae2299f [doc] mention whitelist is inbound, and applies to blocksonly (Sjors Provoost) Pull request description: * `-whitelist` only impacts inbound nodes (see #9923). This is obvious in the context of allowing those nodes to connect to you, but there are additional whitelist features where this is less obvious, such as mempool relay behavior. * `whitelistrelay` (on by default) explains that `-blocksonly` makes an exception for transactions from whitelisted nodes, but it wasn't documented (nor obvious imo) the other way around. See also https://github.com/bitcoin/bitcoin/pull/15984#issuecomment-490645552 Top commit has no ACKs. Tree-SHA512: 03e363a5da5d81ad147d1c7e38bf11114df8bb89bdd66fb551520b25f810efa886ec6e649d3b435c4935e0ae4f39bb718bc7bb5778b9de6aa0b71e970a431af8