Commit graph

2444 commits

Author SHA1 Message Date
Wladimir J. van der Laan f19ca129ff
Merge #11605: [Wallet] Enable RBF by default in QT
5cbbbd7 [Wallet] Use RBF by default in QT only (Sjors Provoost)

Pull request description:

  ~If there are no objections, this would supersede #11556.~

  Enabling RBF by default avoids the need to explain all possible use cases of RBF.

  This PR does not change the default RPC wallet behavior, as this could break implementations that depend on it and it's not clear what happens when automated services suddenly switch on RBF on a large scale.

  After trying various approaches, we settled on just having QT ignore `-walletrbf`.

  Send screen:
  <img width="388" alt="send" src="https://user-images.githubusercontent.com/10217/34251097-329c8dee-e63f-11e7-9e14-d7f55d2b52cc.png">

  Confirmation screen by default (with RBF):
  <img width="429" alt="rbf yes" src="https://user-images.githubusercontent.com/10217/32442799-f50d54aa-c2fc-11e7-9392-96339d0f1f74.png">

  Confirmation screen without RBF:
  <img width="431" alt="rf no" src="https://user-images.githubusercontent.com/10217/32442793-ef30bc34-c2fc-11e7-8ca2-e86a97175278.png">

Tree-SHA512: 53efb5d277144478143e69dcae8112c1b9c2beb981fdd0fe778592e5f7d5bf838f73d48052ead874586a75b944e8af469b25e5f376c135cf48cc3598e77f5891
2017-12-22 13:15:31 +01:00
Sjors Provoost 5cbbbd7143
[Wallet] Use RBF by default in QT only
GUI wallet uses RBF by default, regardless of -walletrbf.

RPC and debug console in the GUI remain unchanged; they don't
use RBF by default, unless launched with -walletrbf=1.
2017-12-22 09:18:05 +01:00
Wladimir J. van der Laan c66adb286a
Merge #10839: Don't use pass by reference to const for cheaply-copied types (bool, char, etc.)
99ba0c3 Don't use pass by reference to const for cheaply-copied types (bool, char, etc.). (practicalswift)

Pull request description:

  Don't use pass by reference to const for cheaply-copied types (`bool`, `char`, etc.).

Tree-SHA512: ccad5e2695dff0b3d6de3e713ff3448f2981168cdac72d73bee10ad346b9919d8d4d588933369e54657a244b8b222fa0bef919bc56d983e1fa64b2004e51b225
2017-12-14 18:28:01 +01:00
Wladimir J. van der Laan 5d132e8b97
Merge #10574: Remove includes in .cpp files for things the corresponding .h file already included
a720b92 Remove includes in .cpp files for things the corresponding .h file already included (practicalswift)

Pull request description:

  Remove includes in .cpp files for things the corresponding .h file already included.

  Example case:
  * `addrdb.cpp` includes `addrdb.h` and `fs.h`
  * `addrdb.h` includes `fs.h`

  Then remove the direct inclusion of `fs.h` in `addrman.cpp` and rely on the indirect inclusion of `fs.h` via the included `addrdb.h`.

  In line with the header include guideline (see #10575).

Tree-SHA512: 8704b9de3011a4c234db336a39f7d2c139e741cf0f7aef08a5d3e05197e1e18286b863fdab25ae9638af4ff86b3d52e5cab9eed66bfa2476063aa5c79f9b0346
2017-12-12 14:56:25 +01:00
Wladimir J. van der Laan 80f9dad0b7
Merge #11809: gui: Fix proxy setting options dialog crash
f05d349 gui: Fix proxy setting options dialog crash (Wladimir J. van der Laan)

Pull request description:

  This fixes a crash bug when opening the options dialog.

  - Check the return value of split() to avoid segmentation faults due to   out of bounds when the user manages to enter invalid proxy settings.  This is reported resonably often.

  - Move the default proxy/port to a constant instead of hardcoding magic values.

  - Factor out some common code.

  - Revert #11448 because this proves a more robust replacement, it is no longer necessary and didn't generally solve the issue.

  No attempt is made to do full sanity checking on the proxy, so it can still be rejected by the core with an InitError message.

Tree-SHA512: 72b700b7d6c4d3e3410f0c60e9e4facf93d7c6c1a1b6b23957c48b074a045970f518166952859d1ebca8620062cb70d222670a7310bbd6fe50550ec6d04417b5
2017-12-07 17:40:11 +01:00
Wladimir J. van der Laan f05d349887 gui: Fix proxy setting options dialog crash
This fixes a crash bug when opening the options dialog.

- Check the return value of split() to avoid segmentation faults due to
  out of bounds when the user manages to enter invalid proxy settings.
  This is reported resonably often.

- Move the default proxy/port to a constant instead of hardcoding magic
  values.

- Factor out some common code.

- Revert #11448 because this proves a more robust replacement, it is no
  longer necessary and didn't generally solve the issue.

No attempt is made to do full sanity checking on the proxy, so it can
still be rejected by the core with an InitError message.
2017-12-07 17:34:16 +01:00
Jonas Schnelli 91eeaa0335
Merge #11556: [Qt] Improved copy for RBF checkbox and tooltip
db0b7373f [Qt] Improved copy: RBF checkbox, tooltip and confirmation screen (Sjors Provoost)

Pull request description:

  Fixes #11344 and replaces #11428.

  **Before**:
  <img width="588" alt="before" src="https://user-images.githubusercontent.com/10217/31984211-3299e81a-b993-11e7-94e9-bf63d2fed4bd.png">

  **After**:
  <img width="578" alt="after" src="https://user-images.githubusercontent.com/10217/31984404-11f839da-b994-11e7-86ad-4c17a7d44b86.png">

Tree-SHA512: 04876b2f2eab53c8d4fd4279e8384fd4869af7e15de7648b2689092f800b6ae9c890c01c26c2f7deffe79a1d70c6440d702cbe420e44fe3ded25c5b83d44ecfa
2017-12-04 21:30:25 -10:00
MarcoFalke fbce66a982
Merge #10493: Use range-based for loops (C++11) when looping over map elements
680bc2cbb Use range-based for loops (C++11) when looping over map elements (practicalswift)

Pull request description:

  Before this commit:

  ```c++
  for (std::map<T1, T2>::iterator x = y.begin(); x != y.end(); ++x) {
      T1 z = (*x).first;
      …
  }
  ```

  After this commit:

  ```c++
  for (auto& x : y) {
      T1 z = x.first;
      …
  }
  ```

Tree-SHA512: 954b136b7f5e6df09f39248a6b530fd9baa9ab59d7c2c7eb369fd4afbb591b7a52c92ee25f87f1745f47b41d6828b7abfd395b43daf84a55b4e6a3d45015e3a0
2017-11-30 17:10:05 -05:00
Jonas Schnelli 38d31f95d3
Merge #11395: Qt: Enable searching by transaction id
eac2abca0 Qt: Enable searching by transaction id (Luke Dashjr)
c407c61c5 Qt: Avoid invalidating the search filter, when it doesn't really change (Luke Dashjr)
b1f634242 Qt: Rename confusingly-named "address prefix" to "search string" (Luke Dashjr)

Pull request description:

Tree-SHA512: 1c67037d19689fbaff21d15ed7848ac86188e5de34728312e1f9758dada759cab50d913a5bc09e413ecaa3e07557cf253809b95b5637ff79f2e3cf24d86dd3ed
2017-11-29 13:51:16 -10:00
Wladimir J. van der Laan 7293d06413
Merge #11698: [Docs] [Qt] RPC-Console nested commands documentation
c3055bb Add help-console command to Qt debug console (Luke Mlsna)

Pull request description:

  This PR would close issue #9195 by adding documentation for the debug console features (mainly nested commands) which were added in [PR #7783](https://github.com/bitcoin/bitcoin/pull/7783).

  The following changes were made to QT debug console code:
  - Added a line to the initial message text at the top of the debug console:

  > For more information on using this console type **help-console**.

  - Added a pseudo-command `help-console` which is hooked after parsing the request, but before actually executing the RPC thread. It prints the following text to the console as if it were a valid RPC response.

  > This console accepts RPC commands using the standard syntax.
  >    example:    getblockhash 8
  > This console can also accept RPC commands using bracketed syntax.
  >    example:    getblockhash(8)
  > A space or a comma can be used to separate arguments for either syntax.
  >    example:    sendtoaddress \<address\> \<amount\>
  >                    sendtoaddress,\<address\>,\<amount\>
  > Commands may be nested when specified with the bracketed syntax.
  >    example:    getblockinfo(getblockhash(0),true).
  > Result values can be queried with a non-quoted string in brackets.
  >    example:    getblock(getblockhash(0) true)[height]

  This seemed like a reasonably sane way to introduce a fake RPC help command, but

Tree-SHA512: 35d73dcef9c4936b8be99e80978169f117c22b94f4400c91097bf7e0e1489060202dcd738d9debdf4c8a7bd10709e2c19d4f625f19e47c4a034f1d6019c0e0f2
2017-11-19 13:04:43 +01:00
Wladimir J. van der Laan d080a7d503
Merge #11466: Specify custom wallet directory with -walletdir param
c1e5d40 Make debugging test crash easier (MeshCollider)
8263f6a Create walletdir if datadir doesn't exist and fix tests (MeshCollider)
9587a9c Default walletdir is wallets/ if it exists (MeshCollider)
d987889 Add release notes for -walletdir and wallets/ dir (MeshCollider)
80c5cbc Add test for -walletdir (MeshCollider)
0530ba0 Add -walletdir parameter to specify custom wallet dir (MeshCollider)

Pull request description:

  Closes #11348

  Adds a `-walletdir` parameter which specifies a directory to use for wallets, allowing them to be stored separately from the 'main' data directory. Creates a new `wallets/` directory in datadir if this is the first time running, and defaults to using it if it exists.

  Includes tests and release notes. Things which might need to be considered more:
  - there is no 'lock' on the wallets directory, which might be needed?
  - because this uses a new wallets/ directory by default, downgrading to an earlier version won't see the wallets in that directory (not a big deal though, users can just copy them up to the main dir)
  - jnewbery suggested putting each wallet in its own directory, which is a good idea, but out of scope for this PR IMO. EDIT: this is being done in https://github.com/bitcoin/bitcoin/pull/11687
  - doc/files.md needs updating (will do soon)

  I also considered including  a cleanup by removing caching of data directory paths and instead just initialise them once on startup (c.f. #3073), but decided it wasn't super relevant here will just complicate review.

Tree-SHA512: c8ac04bfe9a810c32055f2c8b8fa0d535e56125ceb8d96f12447dd3538bf3e5ee992b60b1cd2173bf5f3fa023a9feab12c9963593bf27ed419df929bb413398d
2017-11-18 14:41:15 +01:00
Sjors Provoost db0b7373fc
[Qt] Improved copy: RBF checkbox, tooltip and confirmation screen
Opt-in RBF checkbox uses less technical jargon and emphasises
the fee bump functionality (at the expense of not mentioning
other uses of RBF).

The transaction confirmation screen uses copy consistent with this.
2017-11-18 13:12:07 +01:00
Luke Mlsna c3055bbea1
Add help-console command to Qt debug console
- Added `help-console` to the list of autocompletion strings
     - Implemented requested changes to help message:
       - Added an example that uses access-by-index `getblock(getblockhash(0) true)[tx][0]`
       - Replace "bracketed syntax" to "parenthesized syntax" where applicable
       - Replace "separate" with "delimit"
       - Removed `<br>` and `<b>help/help-console</b>` from translation strings, since these parts don't change between languages
       - Changed examples to be based off `getblock 0` so they will work even with pruned/no blockchain and `disablewallet` if copied and pasted
       - Clarified syntax for queries of named/unnamed result objects.
2017-11-17 23:28:11 -06:00
Wladimir J. van der Laan f6f8d54aff
Merge #10920: [qt] Fix potential memory leak in newPossibleKey(ChangeCWallet *wallet)
446e261 [qt] Fix potential memory leak in newPossibleKey(ChangeCWallet *wallet) (practicalswift)

Pull request description:

  Fix potential memory leak in `newPossibleKey(ChangeCWallet *wallet)`.

Tree-SHA512: 252d3828133a0d241cc649aed1280e14a5d5ea47b7b2989039cfa5061a8e35183c7f36d7320aa0ac1b4dcab31e584b358dbbb2fe645a412371d0a460878e2b58
2017-11-17 13:07:37 +01:00
MeshCollider 8263f6a5ac Create walletdir if datadir doesn't exist and fix tests 2017-11-18 00:50:59 +13:00
MeshCollider 0530ba0eae Add -walletdir parameter to specify custom wallet dir 2017-11-18 00:50:58 +13:00
practicalswift a720b928c8 Remove includes in .cpp files for things the corresponding .h file already included 2017-11-16 22:26:34 +01:00
Wladimir J. van der Laan e7b31631c7 qt: refactor: Changes to make include paths absolute
This makes all include paths in the GUI absolute.

Many changes are involved as every single source file in
src/qt/ assumes to be able to use relative includes.
2017-11-16 08:23:02 +13:00
Wladimir J. van der Laan 5b56ec969f qt: refactor: Use absolute include paths in .ui files 2017-11-16 08:23:02 +13:00
MeshCollider 1a445343f6 scripted-diff: Replace #include "" with #include <> (ryanofsky)
-BEGIN VERIFY SCRIPT-
for f in \
  src/*.cpp \
  src/*.h \
  src/bench/*.cpp \
  src/bench/*.h \
  src/compat/*.cpp \
  src/compat/*.h \
  src/consensus/*.cpp \
  src/consensus/*.h \
  src/crypto/*.cpp \
  src/crypto/*.h \
  src/crypto/ctaes/*.h \
  src/policy/*.cpp \
  src/policy/*.h \
  src/primitives/*.cpp \
  src/primitives/*.h \
  src/qt/*.cpp \
  src/qt/*.h \
  src/qt/test/*.cpp \
  src/qt/test/*.h \
  src/rpc/*.cpp \
  src/rpc/*.h \
  src/script/*.cpp \
  src/script/*.h \
  src/support/*.cpp \
  src/support/*.h \
  src/support/allocators/*.h \
  src/test/*.cpp \
  src/test/*.h \
  src/wallet/*.cpp \
  src/wallet/*.h \
  src/wallet/test/*.cpp \
  src/wallet/test/*.h \
  src/zmq/*.cpp \
  src/zmq/*.h
do
  base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f
done
-END VERIFY SCRIPT-
2017-11-16 08:23:01 +13:00
MarcoFalke 4ed818060e
Merge #10600: Make feebumper class stateless
aed1d90ac [wallet] Change feebumper from class to functions (Russell Yanofsky)
37bdcca3c [refactor] Make feebumper namespace (Russell Yanofsky)
7c4f00919 [trivial] Rename feebumper variables according to project code style (Russell Yanofsky)

Pull request description:

  Make feebumper methods static and remove stored state in the class.

  Having the results of feebumper calls persist in an object makes process
  separation between Qt and wallet awkward, because it means the feebumper object
  either has to be serialized back and forth between Qt and wallet processes
  between fee bump calls, or that the feebumper object needs to stay alive in the
  wallet process with an object reference passed back to Qt. It's simpler just to
  have fee bumper calls return their results immediately instead of storing them
  in an object with an extended lifetime.

  In addition to making feebumper methods static, also:

  - Move LOCK calls from Qt code to feebumper
  - Move TransactionCanBeBumped implementation from Qt code to feebumper
  - Rename CFeeBumper class to FeeBumper (every CFeeBumper reference had to be
    updated in this PR anyway so this doesn't increase the size of the diff)

  This change was originally part of https://github.com/bitcoin/bitcoin/pull/10244

Tree-SHA512: bf75e0c741b4e9c8912e66cc1dedf0ff715f77ea65fc33f7020d97d9099b0f6448f5852236dac63eea649de7d6fc03b0b21492e2c5140fb7560a39cf085506fd
2017-11-15 12:50:17 -05:00
MarcoFalke 13e352dc53
Merge #3716: GUI: Receive: Remove option to reuse a previous address
927f4ff5a GUI: Receive: Remove option to reuse a previous address (Luke Dashjr)

Pull request description:

  This was justified by the need to "resent" an invoice, but now that we have the request history, that need should be gone.

Tree-SHA512: 4ade4eb84a21bbbd8dcc3a2c9580d416e113284b5bdf350c22051c233101fe0ee31659c54a7a46e7136f9c999acb61efbbb3f97aeb2fa7b2b1e1daec02ca0837
2017-11-11 13:29:52 -05:00
Luke Dashjr 927f4ff5a2 GUI: Receive: Remove option to reuse a previous address
This was justified by the need to "resent" an invoice, but now that we have the request history, that need should be gone.
2017-11-11 07:51:08 +00:00
Russell Yanofsky aed1d90aca [wallet] Change feebumper from class to functions
Change feebumper from a stateful class into a namespace of stateless
functions.

Having the results of feebumper calls persist in an object makes process
separation between Qt and wallet awkward, because it means the feebumper object
either has to be serialized back and forth between Qt and wallet processes
between fee bump calls, or that the feebumper object needs to stay alive in the
wallet process with an object reference passed back to Qt. It's simpler just to
have fee bumper calls return their results immediately instead of storing them
in an object with an extended lifetime.

In addition to making feebumper stateless, also:

- Move LOCK calls from Qt code to feebumper
- Move TransactionCanBeBumped implementation from Qt code to feebumper
2017-11-10 17:16:46 -05:00
Russell Yanofsky 37bdcca3c3 [refactor] Make feebumper namespace
Future commit will remove the FeeBumper class. This commit simply places
everything into a feebumper namespace, and changes the enum class name
from BumpeFeeResult to feebumper::Result.
2017-11-10 17:03:15 -05:00
Russell Yanofsky 7c4f009195 [trivial] Rename feebumper variables according to project code style
Future PRs will completely refactor this translation unit and touch all
this code so we rename the variables to follow project stlye guidelines
in this preparation commit.

Don't use m_ prefixes for member variables since we're going to remove
the class entirely in the next commits.
2017-11-10 17:01:41 -05:00
MarcoFalke ee92243e66
Merge #11623: tests: Add missing locks to tests
109a85899 tests: Add missing locks to tests (practicalswift)

Pull request description:

  Add missing locks to tests to satisfy lock requirements (such as `EXCLUSIVE_LOCKS_REQUIRED(...)` (Clang Thread Safety Analysis, see #11226), `AssertLockHeld(...)` and implicit lock assumptions).

Tree-SHA512: 1aaeb1da89df1779f02fcceff9d2f8ea24a3926d421f9ea305a19be04dd0b3e63d91f6c1ed22fb7e6988343f6a5288829a387ef872cfa7b6add57bd01046b5d9
2017-11-10 11:54:16 -05:00
practicalswift 109a858995 tests: Add missing locks to tests
Add missing locks to tests to satisfy lock requirements (such as
EXCLUSIVE_LOCKS_REQUIRED(...) (Clang Thread Safety Analysis),
AssertLockHeld(...) and implicit lock assumptions).
2017-11-10 17:16:07 +01:00
MarcoFalke 22cdf93c06
Merge #11316: [qt] Add use available balance in send coins dialog (CryptAxe, promag)
d052e3847 [qt] Add use available balance in send coins dialog (CryptAxe)

Pull request description:

  This is an alternative to #11098 to handle #11033 where a new button `Use available balance` is added to each entry. When activated, the available balance is calculated by using the coin control (if any) and then it's subtracted the remaining recipient amounts. If this amount is positive then the `Subtract fee from amount` is automatically selected.

  Comparing to #11098, this has the advantage to avoid the fair amount division over the recipients and allows to fine adjust the amounts in multiple iterations.

  Started from @CryptAxe commit 89e9eda to credit some code.

  <img width="965" alt="screen shot 2017-09-13 at 01 32 44" src="https://user-images.githubusercontent.com/3534524/30354518-e1bee31c-9824-11e7-9354-300aa63cdfd0.png">
  <img width="964" alt="screen shot 2017-09-13 at 01 44 57" src="https://user-images.githubusercontent.com/3534524/30354598-5731ac9c-9825-11e7-9d5f-8781988ed219.png">

Tree-SHA512: 01d20c13fd8b6c2a0ca1d74d3a9027c6922e6dccd3b08e59d5a72636be7072ed5eca7ebc5d431299497dd3374e83753220ad4174d8bc46dadb4b2f54973036a5
2017-11-10 10:43:55 -05:00
Luke Dashjr eac2abca02 Qt: Enable searching by transaction id 2017-11-10 11:50:05 +00:00
Luke Dashjr c407c61c5b Qt: Avoid invalidating the search filter, when it doesn't really change 2017-11-10 11:50:05 +00:00
Luke Dashjr b1f634242e Qt: Rename confusingly-named "address prefix" to "search string" 2017-11-10 11:50:05 +00:00
Wladimir J. van der Laan 5e9be169e4
Merge #11043: Use std::unique_ptr (C++11) where possible
a357293 Use MakeUnique<Db>(...) (practicalswift)
3e09b39 Use MakeUnique<T>(...) instead of std::unique_ptr<T>(new T(...)) (practicalswift)
8617989 Add MakeUnique (substitute for C++14 std::make_unique) (practicalswift)
d223bc9 Use unique_ptr for pcoinscatcher/pcoinsdbview/pcoinsTip/pblocktree (practicalswift)
b45c597 Use unique_ptr for pdbCopy (Db) and fix potential memory leak (practicalswift)
29ab96d Use unique_ptr for dbenv (DbEnv) (practicalswift)
f72cbf9 Use unique_ptr for pfilter (CBloomFilter) (practicalswift)
8ccf1bb Use unique_ptr for sem{Addnode,Outbound} (CSemaphore) (practicalswift)
73db063 Use unique_ptr for upnp_thread (boost::thread) (practicalswift)
0024531 Use unique_ptr for dbw (CDBWrapper) (practicalswift)
fa6d122 Use unique_ptr:s for {fee,short,long}Stats (TxConfirmStats) (practicalswift)
5a6f768 Use unique_ptr for httpRPCTimerInterface (HTTPRPCTimerInterface) (practicalswift)
860e912 Use unique_ptr for pwalletMain (CWallet) (practicalswift)

Pull request description:

  Use `std::unique_ptr` (C++11) where possible.

  Rationale:
  1. Avoid resource leaks (specifically: forgetting to `delete` an object created using `new`)
  2. Avoid undefined behaviour (specifically: double `delete`:s)

  **Note to reviewers:** Please let me know if I've missed any obvious `std::unique_ptr` candidates. Hopefully this PR should cover all the trivial cases.

Tree-SHA512: 9fbeb47b800ab8ff4e0be9f2a22ab63c23d5c613a0c6716d9183db8d22ddbbce592fb8384a8b7874bf7375c8161efb13ca2197ad6f24b75967148037f0f7b20c
2017-11-09 21:34:25 +01:00
practicalswift d223bc940a Use unique_ptr for pcoinscatcher/pcoinsdbview/pcoinsTip/pblocktree
* pcoinscatcher (CCoinsViewErrorCatcher)
* pcoinsdbview (CCoinsViewDB)
* pcoinsTip (CCoinsViewCache)
* pblocktree (CBlockTreeDB)
* Remove variables shadowing pcoinsdbview
2017-11-09 16:53:34 +01:00
Matt Corallo 9e9e31aa10 Fix qt build broken by 5a5e4e9 2017-11-09 10:43:13 -05:00
Wladimir J. van der Laan 77ba4bf960
Merge #10368: [wallet] Remove helper conversion operator from wallet
5a5e4e9 [wallet] Remove CTransaction&() helper conversion operator from wallet implementation. (Karl-Johan Alm)

Pull request description:

  The `CTransaction&()` operator in `CMerkleTx` makes conversion into `CTransaction`s transparent, but was marked as to-be-removed in favor of explicitly getting the `tx` ivar, presumably as the operator can lead to ambiguous behavior and makes the code harder to follow.

  This PR removes the operator and adapts callers. This includes some cases of `static_cast<CTransaction>(wtx)` → `*wtx.tx`, which is definitely an improvement.

Tree-SHA512: 95856fec7194d6a79615ea1c322abfcd6bcedf6ffd0cfa89bbdd332ce13035fa52dd4b828d20df673072dde1be64b79c513529a6f422dd5f0961ce722a32d56a
2017-11-09 14:23:13 +01:00
Wladimir J. van der Laan ef3758d1ef
Merge #10696: Remove redundant nullptr checks before deallocation
b109a1c Remove redundant nullptr checks before deallocation (practicalswift)

Pull request description:

  Rationale:
  * `delete ptr` is a no-op if `ptr` is `nullptr`

Tree-SHA512: c98ce769125c4912186a8403cc08a59cfba85b7141af645c709b4c4eb90dd9cbdd6ed8076d50099d1e4ec2bf75917d1af6844082ec42bbb4d94d229a710e051c
2017-11-09 13:38:48 +01:00
Wladimir J. van der Laan ffc0b11503
Merge #11480: [ui] Add toggle for unblinding password fields
ff35de8 [ui] Add toggle for unblinding password fields (Thomas Snider)

Pull request description:

  Proposed change for adding the ability to toggle password visibility in the password dialog.  This is similar to functionality in most password managers and is specifically added with the use case of password managers in mind - the password in that case is likely pasted twice into both the new password and confirm password fields.

  If this is a welcome change, I am open to suggestions on rearranging the layout.

Tree-SHA512: 1823f356f8f941cc584c44de264433e9a573cb8a358efa300a412c4458b5564d8d193969be40859195cf9c8d6768eee895ee22440d51db4f09175f9b4e28bced
2017-11-07 08:26:45 +01:00
Jonas Schnelli 6157e8ce39
Merge #11499: [Qt] Add upload and download info to the peerlist (debug menu)
6b1891e2c Add Sent and Received information to the debug menu peer list (Aaron Golliver)
8e4aa35ff move human-readable byte formatting to guiutil (Aaron Golliver)

Pull request description:

  Makes the peer list display how much you've uploaded/downloaded from each peer.

  Here's a screenshot ~~[outdated](https://i.imgur.com/MhPbItp.png)~~, [current](https://i.imgur.com/K1htrVv.png) of how it looks. You can now sort to see who are the peers you've uploaded the most too.

  I also moved `RPCConsole::FormatBytes` to `guiutil::formatBytes` so I could use it in the peerlist

Tree-SHA512: 8845ef406e4cbe7f981879a78c063542ce90f50f45c8fa3514ba3e6e1164b4c70bb2093c4e1cac268aef0328b7b63545bc1dfa435c227f28fdb4cb0a596800f5
2017-10-22 15:33:11 -10:00
Thomas Snider ff35de8f03 [ui] Add toggle for unblinding password fields 2017-10-18 13:22:30 -07:00
Aaron Golliver 6b1891e2c0 Add Sent and Received information to the debug menu peer list 2017-10-16 20:58:23 -07:00
Aaron Golliver 8e4aa35ffb move human-readable byte formatting to guiutil 2017-10-16 20:58:23 -07:00
Jonas Schnelli 207408b088
Fix crash via division by zero assertion 2017-10-15 22:44:01 -07:00
Jonas Schnelli 8c2de827e9
Merge #7061: [Wallet] Add RPC call "rescanblockchain <startheight> <stopheight>"
7a91ceb5e [QA] Add RPC based rescan test (Jonas Schnelli)
c77170fbd [Wallet] add rescanblockchain <start_height> <stop_height> RPC command (Jonas Schnelli)

Pull request description:

  A RPC rescan command is much more flexible for the following reasons:
  * You can define the start and end-height
  * It can be called during runtime
  * It can work in multiwallet environment

Tree-SHA512: df67177bad6ad1d08e5a621f095564524fa3eb87204c2048ef7265e77013e4b1b29f991708f807002329a507a254f35e79a4ed28a2d18d4b3da7a75d57ce0ea5
2017-10-13 15:23:22 -07:00
Wladimir J. van der Laan 470c730e3f
Merge #10898: Fix invalid checks (NULL checks after dereference, redundant checks, etc.)
76fed83 Avoid NULL pointer dereference when _walletModel is NULL (which is valid) (practicalswift)
4971a9a Use two boolean literals instead of re-using variable (practicalswift)
b5fb339 Remove duplicate uriParts.size() > 0 check (practicalswift)
7466991 Remove redundant check (!ecc is always true) (practicalswift)
55224af Remove redundant NULL checks after new (practicalswift)

Pull request description:

  Contains:
  * Remove redundant `NULL` checks after throwing `new`
  * Remove redundant check (`!ecc` is always true)
  * Remove duplicate `uriParts.size() > 0` check
  * Use two boolean literals instead of re-using variable

Tree-SHA512: 30e9af8a9d5c8184836f8267b492aeb4e26eca171a3be08f634b3f39b3055b9fa9f06623f6c69b294ca13bf99743f7645cfac2b25e014ff74687bd085a997895
2017-10-12 23:55:50 +02:00
Jonas Schnelli c77170fbdb
[Wallet] add rescanblockchain <start_height> <stop_height> RPC command 2017-10-12 11:59:21 -07:00
Wladimir J. van der Laan a865b38bf3
Merge #11133: Document assumptions that are being made to avoid division by zero
55509f1 Document assumptions that are being made to avoid division by zero (practicalswift)

Pull request description:

  Document assumptions (via `assert(…)`:s) that are being made to avoid division by zero.

  Rationale:
  * Make it clear to human reviewers and non-human static analyzers that what might look like potential division by zero cases are written the way they are intentionally (these cases are currently flagged by various static analyzers).

Tree-SHA512: bbb67b1370afd8f39bda35f9e3a20f4325f017d94cc1bfac3b0d36c9f34c2d95a9efe11efe44db29fb4aadd25d8276d8f0e03c8806ac64f0d21d821912e13b8e
2017-10-12 13:40:16 +02:00
practicalswift 680bc2cbb3 Use range-based for loops (C++11) when looping over map elements
Before this commit:

  for (std::map<T1, T2>::iterator x = y.begin(); x != y.end(); ++x) {
  }

After this commit:

  for (auto& x : y) {
  }
2017-10-09 21:31:58 +02:00
Cristian Mircea Messel ce2418fa4c [gui] reset addrProxy/addrSeparateProxyTor if colon char missing
If addrProxy or addrSeparateProxyTor do not have a colon in the string
somewhere in the QSettings storage, then attempting to open the options
dialog will cause the entire program to crash.
2017-10-04 01:09:12 +03:00
MarcoFalke f199b8a33d
Merge #11365: [Tests] Add Qt GUI tests to Overview and ReceiveCoin Page
634e38ca7 [Tests] Add Qt GUI tests to Overview and ReceiveCoin Page (Anditto Heristyo)

Pull request description:

  I've added some Qt wallet tests based on #9974, namely the input & buttons on ReceiveCoin.

Tree-SHA512: f4223827145e35c2abee83a6ca777498bebcff3825fece10fbb1dbfd1f6bb017d3f2c0521662854b4407cdeee9c6a527269ab9cc28e0dc85c11b668155fcd195
2017-10-02 21:19:43 +02:00