aboutsummaryrefslogtreecommitdiff
path: root/src/qt
AgeCommit message (Collapse)Author
2017-09-06Remove duplicate destination decodingJoão Barbosa
2017-09-06Merge #11117: Prepare for non-Base58 addressesWladimir J. van der Laan
864cd2787 Move CBitcoinAddress to base58.cpp (Pieter Wuille) 5c8ff0d44 Introduce wrappers around CBitcoinAddress (Pieter Wuille) Pull request description: This patch removes the need for the intermediary Base58 type `CBitcoinAddress`, by providing {`Encode`,`Decode`,`IsValid`}`Destination` functions that directly operate on the conversion between `std::string`s and `CTxDestination`. As a side, it also fixes a number of indentation issues, and removes probably several unnecessary implicit `CTxDestination`<->`CBitcoinAddress` conversions. This change is far from complete. In follow-ups I'd like to: * Split off the specific address and key encoding logic from base58.h, and move it to a address.h or so. * Replace `CTxDestination` with a non-`boost::variant` version (which can be more efficient as `boost::variant` allocates everything on the heap, and remove the need for `boost::get<...>` and `IsValidDestination` calls everywhere). * Do the same for `CBitcoinSecret`, `CBitcoinExtKey`, and `CBitcoinExtPubKey`. However, I've tried to keep this patch to be minimally invasive, but still enough to support non-Base58 addresses. Perhaps a smaller patch is possible to hack Bech32 support into `CBitcoinAddress`, but I would consider that a move in the wrong direction. Tree-SHA512: c2c77ffb57caeadf2429b1c2562ce60e8c7be8aa9f8e51b591f354b6b441162625b2efe14c023a1ae485cf2ed417263afa35c892891dfaa7844e7fbabccab85e
2017-09-06Introduce wrappers around CBitcoinAddressPieter Wuille
This patch removes the need for the intermediary Base58 type CBitcoinAddress, by providing {Encode,Decode,IsValid}Destination function that directly operate on the conversion between strings and CTxDestination.
2017-09-06Merge #11210: Stop test_bitcoin-qt touching ~/.bitcoinWladimir J. van der Laan
dea086f49 Stop test_bitcoin-qt touching ~/.bitcoin (MeshCollider) Pull request description: Fixes https://github.com/bitcoin/bitcoin/issues/11192 The directory remains unused, but this stops the tests touching ~/.bitcoin at all (namely creating it if it doesn't exist) Tree-SHA512: e59ad6b83dbc5ea2fb2761994c09933721d29668b0eef09b9d938a4ee1c67871c5125c57483ee0ea25f2385e308d275d86bcb9087dd4d502923013b4f3dbac82
2017-09-05Merge #11247: qt: Use IsMine to validate custom change addressMarcoFalke
a1ea1cfbd qt: Use IsMine to validate custom change address (Chris Moore) Pull request description: Fixes #11137 Closes #11184 (which was accidentally opened against 0.15 branch) Tree-SHA512: a20a59b4f36c1471a9c84bcc7c69048576d1f413104c299a7ed9ba221f28eddf93d727fca2926420ea5d0dd9aba582924f26a5acd44d995039b7202c73eb53bc
2017-09-05qt: Use IsMine to validate custom change addressChris Moore
(cherry picked from commit c41224dfd51c896341bbf2fa23e160bf5ffe27c3)
2017-09-05Merge #11234: Remove redundant testutil.cpp|h filesWladimir J. van der Laan
d1138e362 Remove redundant testutil files (MeshCollider) Pull request description: The only function in testutil.cpp, `GetTempPath()` simply called `fs::temp_directory_path()` directly. This just tidies things up by removing that redundant function and the file containing it I can understand wanting a general util file for tests to use, but if there's nothing in it, we might as well remove it, it can always be added back later when it's put to use. Tree-SHA512: b923f99acf33328743755368a1aa90f5da4a7d5f61b163a4b0b894275c98db80a91edf8f051fbfb4893d970fda5a9078aae78a2672867ff521c4ca4b653c71c0
2017-09-05Merge #11179: rpc: Push down safe mode checksWladimir J. van der Laan
ec6902d0e rpc: Push down safe mode checks (Andrew Chow) Pull request description: This contains most of the changes of #10563 "remove safe mode" by @achow101, but doesn't remove the safe mode yet, but put an `ObserveSafeMode()` check in (all 23) individual calls which used to have okSafeMode=false. This cleans up the ugly "okSafeMode" flag from the dispatch tables, which is not a concern for the RPC server. Extra-author: Wladimir J. van der Laan <laanwj@gmail.com> Tree-SHA512: eee0f251fe2f38f122e7391e3c4e98d6a1e2757f3b718d6b560ad835ae94f11490865a0aef893e90b5fe298165932c8dd8298224173ac2677a5245cd532bac6e
2017-09-05Remove redundant testutil filesMeshCollider
2017-09-02Merge #11198: [Qt] Fix display of package name on 'open config file' tooltipMarcoFalke
14ccd4d8d [Qt] Fix display of package name on 'open config file' tooltip (Daniel Edgecumbe) Pull request description: This patch addresses https://github.com/bitcoin/bitcoin/issues/11197. Tree-SHA512: b826fa2eb69f2c8054d2e84614e067bb00d2176701992dadfea01c2ad63d29015acdb76c5b874f5f6bda52b1f05e3ccfa1b67a4ee2f1e0c26496d1ff1718f325
2017-09-01Stop test_bitcoin-qt touching ~/.bitcoinMeshCollider
2017-08-30[Qt] Fix display of package name on 'open config file' tooltipDaniel Edgecumbe
2017-08-29rpc: Push down safe mode checksAndrew Chow
This contains most of the changes of 10563 "remove safe mode", but doesn't remove the safe mode yet, but put an `ObserveSafeMode()` check in individual calls with okSafeMode=false. This cleans up the ugly "okSafeMode" flag from the dispatch tables, which is not a concern for the RPC server. Extra-author: Wladimir J. van der Laan <laanwj@gmail.com>
2017-08-27Make tabs toolbar no longer have a context menuAndrew Chow
Adds a contextMenuPolicy of Qt::PreventContextMenu to prevent the tabs toolbar from showing a context menu that allows it to be hidden.
2017-08-25Merge #10976: [MOVEONLY] Move some static functions out of wallet.h/cppWladimir J. van der Laan
f01103c MOVEONLY: Init functions wallet/wallet.cpp -> wallet/init.cpp (Russell Yanofsky) e7fe320 MOVEONLY: Fee functions wallet/wallet.cpp -> wallet/fees.cpp (Russell Yanofsky) d97fe20 Move some static functions out of wallet.h/cpp (Russell Yanofsky) Pull request description: This just moves some static wallet fee and init functions out of `wallet/wallet.cpp` and into new `wallet/fees.cpp` and `wallet/init.cpp` source files. There is one commit updating declarations and callers, followed by two MOVEONLY commits actually moving the function bodies. This change is desirable because wallet.h/cpp are monolithic and hard to navigate, so pulling things out and grouping together pieces of related functionality should improve the organization. Another motivation is the wallet process separation work in https://github.com/bitcoin/bitcoin/pull/10973, where (at least initially) parameter parsing and fee estimation are still done in the main process rather than the wallet process, and having functions that run in different processes scrambled up throughout wallet.cpp is unnecessarily confusing. Tree-SHA512: 6e6982ff82b2ab4e681c043907e2b1801ceb9513394730070f16c46ad338278a863f5b3759aa13db76a259b268b1c919c81f4e339f0796a3cfb990161e8c316d
2017-08-18Merge #11039: Avoid second mapWallet lookupWladimir J. van der Laan
8f2f1e0 wallet: Avoid second mapWallet lookup (João Barbosa) Pull request description: All calls to `mapWallet.count()` have the intent to detect if a `txid` exists and most are followed by a second lookup to retrieve the `CWalletTx`. This PR replaces all `mapWallet.count()` calls with `mapWallet.find()` to avoid the second lookup. Tree-SHA512: 96b7de7f5520ebf789a1aec1949a4e9c74e13683869cee012f717e5be8e51097d068e2347a36e89097c9a89f1ed1a1529db71760dac9b572e36a3e9ac1155f29
2017-08-18Document the preference of nullptr over NULL or (void*)0practicalswift
2017-08-16Declare single-argument (non-converting) constructors "explicit"practicalswift
In order to avoid unintended implicit conversions.
2017-08-16Merge #9964: Add const to methods that do not modify the object for which it ↵MarcoFalke
is called 6e8c48dc5 Add const to methods that do not modify the object for which it is called (practicalswift) Pull request description: Tree-SHA512: a6888111ba16fb796e320e60806e1a77d36f545989b5405dc7319992291800109eab0b8e8c286b784778f41f1ff5289e7cb6b4afd7aec77f385fbcafc02cffc1
2017-08-16Merge #10956: Fix typosMarcoFalke
9d5e98ff8 Fix typos. (practicalswift) Pull request description: Fix some typos not covered by #10705. Tree-SHA512: f06e9541f6ae13ef5d6731399b61795997b21a8816abeb1749c93e99a5c47354e6cbd4a3d145f4dc6ef8a13db179799a3121ecbb7288abf3e8d81cdf81500d37
2017-08-16Merge #10705: Trivial: spelling fixesMarcoFalke
f42fc1d50 doc: spelling fixes (klemens) Pull request description: patch contains some spelling fixes ( just in comments ) as found by a bot ( http://www.misfix.org, https://github.com/ka7/misspell_fixer ). Tree-SHA512: ba6046cfcd81b0783420daae7d776be92dd7b85a593e212f8f1b4403aca9b1b6af12cef7080d4ea5ed4a14952fd25e4300109a59c414e08f5395cdb9947bb750
2017-08-16doc: spelling fixesklemens
2017-08-15Merge #10964: Pass SendCoinsRecipient (208 bytes) by referenceJonas Schnelli
d3d946a29 Pass SendCoinsRecipient (208 bytes) by const reference (practicalswift) Pull request description: Pass `SendCoinsRecipient` (208 bytes) by reference. Avoid passing big parameters by value. Tree-SHA512: 504791f1b1c73badbc276db13b83e39695298d7d82a9db0e48d54e7ef02f1a8d276b0adfdece1ba1130cc214e2f0fa9a3100b5359d0ca0fe96558d3c9a786e6e
2017-08-14wallet: Avoid second mapWallet lookupJoão Barbosa
2017-08-14Move some static functions out of wallet.h/cppRussell Yanofsky
This commit just moves a few function declarations and updates callers. Function bodies are moved in two followup MOVEONLY commits. This change is desirable because wallet.h/cpp are monolithic and hard to navigate, so pulling things out and grouping together pieces of related functionality should improve the organization. Another proximate motivation is the wallet process separation work in https://github.com/bitcoin/bitcoin/pull/10973, where (at least initially) parameter parsing and fee estimation are still done in the main process rather than the wallet process, and having functions that run in different processes scrambled up throughout wallet.cpp is unnecessarily confusing.
2017-08-14scripted-diff: stop using the gArgs wrappersMarko Bencun
They were temporary additions to ease the transition. -BEGIN VERIFY SCRIPT- find src/ -name "*.cpp" ! -wholename "src/util.h" ! -wholename "src/util.cpp" | xargs perl -i -pe 's/(?<!\.)(ParseParameters|ReadConfigFile|IsArgSet|(Soft|Force)?(Get|Set)(|Bool|)Arg(s)?)\(/gArgs.\1(/g' -END VERIFY SCRIPT-
2017-08-14Merge #10483: scripted-diff: Use the C++11 keyword nullptr to denote the ↵Wladimir J. van der Laan
pointer literal instead of the macro NULL 90d4d89 scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal instead of the macro NULL (practicalswift) Pull request description: Since C++11 the macro `NULL` may be: * an integer literal with value zero, or * a prvalue of type `std::nullptr_t` By using the C++11 keyword `nullptr` we are guaranteed a prvalue of type `std::nullptr_t`. For a more thorough discussion, see "A name for the null pointer: nullptr" (Sutter & Stroustrup), http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf With this patch applied there are no `NULL` macro usages left in the repo: ``` $ git grep NULL -- "*.cpp" "*.h" | egrep -v '(/univalue/|/secp256k1/|/leveldb/|_NULL|NULLDUMMY|torcontrol.*NULL|NULL cert)' | wc -l 0 ``` The road towards `nullptr` (C++11) is split into two PRs: * `NULL` → `nullptr` is handled in PR #10483 (scripted, this PR) * `0` → `nullptr` is handled in PR #10645 (manual) Tree-SHA512: 3c395d66f2ad724a8e6fed74b93634de8bfc0c0eafac94e64e5194c939499fefd6e68f047de3083ad0b4eff37df9a8a3a76349aa17d55eabbd8e0412f140a297
2017-08-09qt: Periodic translations updateWladimir J. van der Laan
Tree-SHA512: f967af98ba40908f3ba1286659a7ffedd1319d8d7d5c8d658f266897cb61ea28bace3f20f8ec77b83a69ac311c7e65467e40c3ee8b320a88768afa15e8c802cc
2017-08-08Fix typos.practicalswift
2017-08-07scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal ↵practicalswift
instead of the macro NULL -BEGIN VERIFY SCRIPT- sed -i 's/\<NULL\>/nullptr/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h src/qt/*/*.cpp src/qt/*/*.h src/wallet/*/*.cpp src/wallet/*/*.h src/support/allocators/*.h sed -i 's/Prefer nullptr, otherwise SAFECOOKIE./Prefer NULL, otherwise SAFECOOKIE./g' src/torcontrol.cpp sed -i 's/tor: Using nullptr authentication/tor: Using NULL authentication/g' src/torcontrol.cpp sed -i 's/METHODS=nullptr/METHODS=NULL/g' src/test/torcontrol_tests.cpp src/torcontrol.cpp sed -i 's/nullptr certificates/NULL certificates/g' src/qt/paymentserver.cpp sed -i 's/"nullptr"/"NULL"/g' src/torcontrol.cpp src/test/torcontrol_tests.cpp -END VERIFY SCRIPT-
2017-08-05qt: Increase BLOCK_CHAIN_SIZE constantsWladimir J. van der Laan
- Increase `BLOCK_CHAIN_SIZE` from 120GB to 150GB - Increase `CHAIN_STATE_SIZE` from 2GB to 4GB I took the local sizes of the blocks and chainstate directory, and added a bit extra to accomodate the near future (15GB for the chain and 1GB for the chainstate).
2017-08-02Pass SendCoinsRecipient (208 bytes) by const referencepracticalswift
2017-08-02Fix typo in sendcoinsdialog.Masahiko Hyuga
2017-07-31qt: Periodic translations updateWladimir J. van der Laan
Tree-SHA512: 08b255a0f90eac4a68dbcd7f8cb497c8f0c70a9248ba29f460b31fd4dafcdf14589cbd4518ba803233349643749a03c7fbd3829caf6dc2cdadac8737f3440819
2017-07-26Merge #10899: [test] Qt: Use _putenv_s instead of setenv on Windows buildsWladimir J. van der Laan
0be03c7 Qt: Use _putenv_s instead of setenv on Windows builds (Brian McMichael) Pull request description: Fixes https://github.com/bitcoin/bitcoin/issues/10836 Error message I would get on `make`: ``` ... CXXLD bench/bench_bitcoin.exe OBJCXXLD qt/bitcoin-qt.exe qt/test/test_main.cpp: In function ‘int main(int, char**)’: qt/test/test_main.cpp:64:43: error: ‘setenv’ was not declared in this scope setenv("QT_QPA_PLATFORM", "minimal", 0); ^ make[2]: *** [qt/test/qt_test_test_bitcoin_qt-test_main.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory `/home/bmcmichael/Projects/bcoin/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/bmcmichael/Projects/bcoin/src' make: *** [all-recursive] Error 1 ``` `setenv` function is not available from the Microsoft runtime library. Need to use `_putenv_s` instead. This solution tells the compiler to use `_putenv_s` on `WIN32` compilation (Note: this also works on 64-bit Windows instances.) and `setenv` everywhere else. I've tested builds on Windows 10 x64 and Ubuntu 16.04 with this code. Tree-SHA512: d53c996c890e3c6f22b4f2dcca718bef9168f19a6d4a29b8ff13391bfc0c8ea9c1cd16782b47c25b156dcbdff18bb19e23bfd5f6fefb1f373c9d5454a13fc969
2017-07-25Merge #10870: [Qt] Use wallet 0 in rpc console if running with multiple walletsWladimir J. van der Laan
9737572 [Qt] Use wallet 0 in rpc console if running with multiple wallets (Jonas Schnelli) Pull request description: Current master with multiwallet results in accessing wallet 0 in QT (send / receive / tx history / etc.), **but** the RPC console cannot access that wallet (only non-wallet commands work). This is a quick solution to re-allow accessing the same wallet (Index 0) via RPC console in multiwallet. The solutions design is not "state of the art" (should go over WalletModel). Ideally we work on an overall multiwallet support for the GUI (which then would remove this change). I think we should consider this as a bugfix. Tree-SHA512: 16cf844662248ffd3d82c7d0cbe5879f231fbc7d4f5a4aab4180a9087018519c98301e4ac311eaec2cc39dddf25d3edf9be99a6622ea682c138a820a9b21fd0c
2017-07-25Add const to methods that do not modify the object for which it is calledpracticalswift
2017-07-21Qt: Use _putenv_s instead of setenv on Windows buildsBrian McMichael
2017-07-20qt: Periodic translations updateWladimir J. van der Laan
Tree-SHA512: 6f2548776007ebe172d43fd26673c62d0db34af815fcf4451cb293f19c0d8cf84a6761dc2636ffb5a906074d70988b3cd805e21b2471de5eb1697fadc82d0205
2017-07-20[Qt] Use wallet 0 in rpc console if running with multiple walletsJonas Schnelli
2017-07-18Avoid redundant redeclaration of GetWarnings(const string&)practicalswift
std::string GetWarnings(const std::string& strFor) is declared in warnings.h and defined in warnings.cpp.
2017-07-17Merge #10832: init: Factor out AppInitLockDataDirectory and fix startup core ↵Wladimir J. van der Laan
dump issue dba485d init: Factor out AppInitLockDataDirectory (Wladimir J. van der Laan) Pull request description: Alternative to #10818, alternative solution to #10815. After this change: All the AppInit steps before and inclusive AppInitLockDataDirectory must not have Shutdown() called in case of failure. Only when AppInitMain fails, Shutdown should be called. Changes the GUI and bitcoind code to consistently do this. Tree-SHA512: 393e1a0ae05eb8e791025069e3ac4f6f3cdeb459ec63feda85d01cf6696ab3fed7632b6a0ac3641b8c7015af51d46756b5bba77f5e5f0c446f0c2dea58bbc92e
2017-07-17init: Factor out AppInitLockDataDirectoryWladimir J. van der Laan
Alternative to #10818, alternative solution to #10815. After this change: All the AppInit steps before and inclusive AppInitLockDataDirectory must not have Shutdown() called in case of failure. Only when AppInitMain fails, Shutdown should be called. Changes the GUI and bitcoind code to consistently do this.
2017-07-14Make QT fee displays use GetMinimumFee instead of estimateSmartFeeAlex Morcos
Remove helper function (CalculateEstimateType) for determining whether estimates should be conservative or not, now that this is only called once from GetMinimumFee and incorporate the logic directly there.
2017-07-14Use CoinControl to pass custom fee setting from QT.Alex Morcos
This fixes buggy behavior where we were temporarily setting and unsetting the global payTxFee when trying to send a transaction with a custom fee from the GUI. The previous behavior was inconsistent depending on the order of using the RPC call settxfee and clicking various radio buttons in the sendcoinsdialog. The new behavior is that transactions sent with the GUI will always use either the smartfee slider value or the custom fee set on the GUI and they will not affect the global defaults which are only for RPC and initial GUI values.
2017-07-14Refactor to use CoinControl in GetMinimumFee and FeeBumperAlex Morcos
Improve parameter precedence in coin_control
2017-07-14Make CoinControl a required argument to CreateTransactionAlex Morcos
2017-07-14Merge #10769: [Qt] replace fee slider with a Dropdown, extend conf. targetsPieter Wuille
2aef1f182 [Qt] migrate old fee slider value to new dropbown Always round up (conservative) (Jonas Schnelli) bc1be90e3 [Qt] replace fee slider with a Dropdown, extend conf. targets (Jonas Schnelli) Tree-SHA512: 53796cf0b434dd3db5d4680dbeb6231a7df8f15d88187178fd4db8917cd7fc60091ce2c1589fd93668fc94bb13f989aba5b7ef3792fa95ee1f9f21a15709e2d3
2017-07-13[Qt] migrate old fee slider value to new dropbownJonas Schnelli
Always round up (conservative)
2017-07-13[Qt] replace fee slider with a Dropdown, extend conf. targetsJonas Schnelli