Commit graph

22712 commits

Author SHA1 Message Date
MarcoFalke
218274de7d
Merge #17819: doc: developer notes guideline on RPCExamples addresses
42ec499489 doc: developer notes guideline on RPCExamples addresses (Jon Atack)

Pull request description:

  to make explicit the use of invalid addresses for user safety and to encourage
  the use of bech32 addresses by default. See https://github.com/bitcoin/bitcoin/pull/17578#discussion_r361752570 and https://github.com/bitcoin/bitcoin/pull/17578#discussion_r362564492.

  Fix a typo to appease the linter.

ACKs for top commit:
  promag:
    ACK 42ec499489, no strong opinion as whether this belongs to developer notes or not but why not.
  fjahr:
    ACK 42ec499
  michaelfolkson:
    ACK 42ec499489

Tree-SHA512: 64f90e227d256aa194c4fd48435440bdc233a51213dd4a6ac5b05d04263f729c6b4bb5f3afd3b87719b20cb1b159d5a9673d58a11b72823a4a6a16e8a26ae10e
2020-01-16 15:23:40 -05:00
Hennadii Stepanov
1a53b0da60
refactor: Simplify connection syntax 2020-01-16 20:44:21 +02:00
Hennadii Stepanov
7d0a8f4f53
refactor: Remove never used default parameter 2020-01-16 20:42:57 +02:00
Wladimir J. van der Laan
f018d0c9cd
Merge #17924: Bug: IsUsedDestination shouldn't use key id as script id for ScriptHash
6dd59d2e49 Don't allow implementers to think ScriptHash(Witness*()) results in nesting computation (Gregory Sanders)
4b8f1e989f IsUsedDestination shouldn't use key id as script id for ScriptHash (Gregory Sanders)

Pull request description:

  Regression introduced in https://github.com/bitcoin/bitcoin/pull/17621 which causes p2sh-segwit addresses to be erroneously missed.

  Tests are only failing in 0.19 branch, likely because that release still uses p2sh-segwit addresses rather than bech32 by default.

  I'll devise a test case to catch this going forward.

ACKs for top commit:
  achow101:
    ACK 6dd59d2e49
  MarcoFalke:
    ACK 6dd59d2
  meshcollider:
    Code review ACK 6dd59d2e49

Tree-SHA512: b3e0f320c97b8c1f814cc386840240cbde2761fee9711617b713d3f75a4a5dce2dff2df573d80873df42a1f4b74e816ab8552a573fa1d62c344997fbb6af9950
2020-01-16 19:23:33 +01:00
fanquake
a9c789ed96
Merge #17935: gui: hide HD & encryption icons when no wallet loaded
486f51099f gui: hide HD & encryption icons when no wallet loaded (Harris)

Pull request description:

  This PR takes care of removing (hiding) the HD wallet and encryption icons when no wallet is loaded.

  Fixes #17927

ACKs for top commit:
  Sjors:
    ACK 486f51099f
  theStack:
    ACK 486f51099f
  fanquake:
    ACK 486f51099f - tested that this fixes #17927. Thanks for following up so quick.
  emilengler:
    ACK 486f510

Tree-SHA512: 6e3e5305a9eefe1692614097c05393aa0dffd561c89cefb40d501e70a8102eafcadfbc1c86a35c0b256b0f94f41598545d7a043954d6b9669c169d31d95aaf24
2020-01-16 21:56:04 +08:00
João Barbosa
c279a81e9c
gui: Remove warning "unused variable 'wallet_model'" 2020-01-16 14:27:43 +01:00
Peter Bushnell
22c5a986e9
depends: Consistent use of package variable
All other mk files use the package variable consistently except for the two instances here, which have always been here, since depends was introduced in 0.10.
2020-01-16 13:23:02 +00:00
fanquake
4e8b564df0
Merge #17931: test: Fix p2p_invalid_messages failing in Python 3.8 because of warning
f117fb00da Replace coroutine with async def in p2p_invalid_messages.py (Elichai Turkel)

Pull request description:

  In Python 3.8 `p2p_invalid_messages.py` fails because of the following warning python produce:
  ```
  2020-01-15T13:02:14.486000Z TestFramework (INFO): Initializing test directory /tmp/bitcoin_func_test_3xq0f6uh
  ./test/functional/p2p_invalid_messages.py:154: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
    asyncio.run_coroutine_threadsafe(asyncio.coroutine(swap_magic_bytes)(), NetworkThread.network_event_loop).result()
  2020-01-15T13:02:15.306000Z TestFramework (INFO): Sending a bunch of large, junk messages to test memory exhaustion. May take a bit...
  2020-01-15T13:02:17.971000Z TestFramework (INFO): Waiting for node to drop junk messages.
  2020-01-15T13:02:18.042000Z TestFramework.mininode (WARNING): Connection lost to 127.0.0.1:12826 due to [Errno 104] Connection reset by peer
  2020-01-15T13:02:18.141000Z TestFramework (INFO): Sending a message with incorrect size of 2
  2020-01-15T13:02:18.293000Z TestFramework (INFO): Sending a message with incorrect size of 77
  2020-01-15T13:02:18.344000Z TestFramework.mininode (WARNING): Connection lost to 127.0.0.1:12826 due to [Errno 104] Connection reset by peer
  2020-01-15T13:02:18.445000Z TestFramework (INFO): Sending a message with incorrect size of 78
  2020-01-15T13:02:18.597000Z TestFramework (INFO): Sending a message with incorrect size of 79
  2020-01-15T13:02:18.902000Z TestFramework (INFO): Stopping nodes
  2020-01-15T13:02:19.154000Z TestFramework (INFO): Cleaning up /tmp/bitcoin_func_test_3xq0f6uh on exit
  2020-01-15T13:02:19.154000Z TestFramework (INFO): Tests successful
  ```

  so as it says I replaced the co-routine with `async def` which IIUC is supported since Python 3.5, so this makes the test pass both on 3.5+ and on 3.8
  https://docs.python.org/3.5/library/asyncio-task.html ("The async def type of coroutine was added in Python 3.5, and is recommended if there is no need to support older Python versions")

ACKs for top commit:
  laanwj:
    ACK f117fb00da if it passes travis
  fanquake:
    ACK f117fb00da - observed the failure (it's the only test that fails) with Python 3.8.1, tested the fix with 3.5.6 and 3.8.1. This is our only usage of `asyncio.coroutine`.

Tree-SHA512: c21d50b23ef4d8a777fd1d9dfe433c85b0b5fff35afbd338817021ffcd42caea64b4c70e46cb3a8a543a1bf2aaa9a6b4f075f6493ab64192bc12bf8bafc54a87
2020-01-16 17:57:29 +08:00
Harris
486f51099f
gui: hide HD & encryption icons when no wallet loaded 2020-01-15 23:13:16 +01:00
Gregory Sanders
3c30d7118a QT: Change bumpFee asserts to simple error message 2020-01-15 10:51:01 -05:00
Elichai Turkel
f117fb00da
Replace coroutine with async def in p2p_invalid_messages.py 2020-01-15 14:16:27 +02:00
Samuel Dobson
ac61ec9da6
Merge #17843: wallet: Reset reused transactions cache
6fc554f591 wallet: Reset reused transactions cache (Fabian Jahr)

Pull request description:

  Fixes #17603 (together with #17824)

  `getbalances` is using the cache within `GetAvailableCredit` under certain conditions [here](35fff5be60/src/wallet/wallet.cpp (L1826)). For a wallet with `avoid_reuse` activated this can lead to inconsistent reporting of `used` transactions/balances between `getbalances` and `listunspent` as pointed out in #17603. When an address is reused before the first transaction is spending from this address, the cache is not updated even after the transaction is sent. This means the remaining outputs at the reused address are not showing up as `used` in `getbalances`.

  With this change, any newly incoming transaction belonging to the wallet marks all the other outputs at the same address as dirty.

ACKs for top commit:
  kallewoof:
    Code review re-ACK 6fc554f591
  promag:
    ACK 6fc554f591.
  achow101:
    Re-ACK 6fc554f591
  meshcollider:
    Code review ACK 6fc554f591

Tree-SHA512: c4cad2c752176d16d77b4a4202291d20baddf9f27250896a40274d74a6945e0f6b34be04c2f9b1b2e756d3ac669b794969df8f82a98e0b16f10e92f276649ea2
2020-01-15 22:11:33 +13:00
fanquake
002f9e9b40
Merge #17923: refactor: Use PACKAGE_NAME in GUI modal overlay and bitcoin-wallet
5855cc564f bitcoin-wallet: Use PACKAGE_NAME in usage help (Luke Dashjr)
7f5db163a4 GUI: Use PACKAGE_NAME in modal overlay (Luke Dashjr)

Pull request description:

ACKs for top commit:
  hebasto:
    ACK 5855cc564f, checked with
  fanquake:
    ACK 5855cc564f - checked `bitcoin-wallet` and a `--disable-wallet` `bitcoin-qt`.

Tree-SHA512: 3526eb122bfdbc63349d12251f17ffa20c7f3754af4ac9c554e6d36bb14b351f31c413c30401bb3d6e0e6200b72614dfc8475489b1f742b0423bd83fba758b94
2020-01-15 14:19:42 +08:00
fanquake
af05bd9e1e
Merge #17891: scripted-diff: Replace CCriticalSection with RecursiveMutex
e09c701e01 scripted-diff: Bump copyright of files changed in 2020 (MarcoFalke)
6cbe620964 scripted-diff: Replace CCriticalSection with RecursiveMutex (MarcoFalke)

Pull request description:

  `RecursiveMutex` better clarifies that the mutex is recursive, see also the standard library naming: https://en.cppreference.com/w/cpp/thread/recursive_mutex

  For that reason, and to avoid different people asking me the same question repeatedly (e.g. https://github.com/bitcoin/bitcoin/pull/15932#pullrequestreview-339175124 ), remove the outdated alias `CCriticalSection` with a scripted-diff

ACKs for top commit:
  Empact:
    ACK e09c701e01 diff and scripts look correct
  promag:
    ACK e09c701e01
  practicalswift:
    ACK e09c701e01 -- scripted diff looks correct

Tree-SHA512: 4bd7b5de1befdcf91dc8f43c127a1fee49679e06895a43216f160344a395c8e426dc68d529fbd2d5e1c215625a5a392dc415b1bce4127316aae7ecf98030c855
2020-01-15 13:46:21 +08:00
Karl-Johan Alm
75163f4729
bug-fix macos: give free bytes to F_PREALLOCATE
The macos manpage for fcntl (for F_PEOFPOSMODE) states:

> Allocate from the physical end of file.  In this case, fst_length indicates the number of newly allocated bytes desired.
2020-01-15 08:56:39 +09:00
Gregory Sanders
6dd59d2e49 Don't allow implementers to think ScriptHash(Witness*()) results in nesting computation 2020-01-14 17:10:53 -05:00
MarcoFalke
e09c701e01 scripted-diff: Bump copyright of files changed in 2020
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2020-01-15 02:18:00 +07:00
MarcoFalke
6cbe620964 scripted-diff: Replace CCriticalSection with RecursiveMutex
-BEGIN VERIFY SCRIPT-
 # Delete outdated alias for RecursiveMutex
 sed -i -e '/CCriticalSection/d'                 ./src/sync.h
 # Replace use of outdated alias with RecursiveMutex
 sed -i -e 's/CCriticalSection/RecursiveMutex/g' $(git grep -l CCriticalSection)
-END VERIFY SCRIPT-
2020-01-15 01:43:46 +07:00
Gregory Sanders
4b8f1e989f IsUsedDestination shouldn't use key id as script id for ScriptHash 2020-01-14 13:23:24 -05:00
Luke Dashjr
5855cc564f bitcoin-wallet: Use PACKAGE_NAME in usage help 2020-01-14 18:19:00 +00:00
Luke Dashjr
7f5db163a4 GUI: Use PACKAGE_NAME in modal overlay 2020-01-14 18:14:10 +00:00
Hennadii Stepanov
4f7127d1e3
gui: Make Intro consistent with prune checkbox
When prune checkbox is toggled, the related text labels and the amount
of required space shown are updated (previously they were only updated
when the data directory was updated).
2020-01-14 19:14:14 +02:00
Hennadii Stepanov
4824a7d36c
gui: Add Intro::UpdateFreeSpaceLabel()
If a new custom datadir has enough free space, the prune checkbox gets
unchecked, unless -prune=NNN command-line option is provided.
2020-01-14 18:53:08 +02:00
Hennadii Stepanov
daa3f3fa90
refactor: Add Intro::UpdatePruneLabels()
This is a move-only commit and it does not change behavior.
2020-01-14 18:53:02 +02:00
Hennadii Stepanov
e4caa82a03
refactor: Replace static variable with data member 2020-01-14 18:47:50 +02:00
fanquake
ceb789cf3a
Merge #17873: doc: Add to Doxygen documentation guidelines
c902c4c0c6 doc: Add to Doxygen documentation guidelines (Jon Layton)

Pull request description:

  Completes the up-for-grabs PR #16948.

  Changes can be tested here: [doc/developer-notes.md](https://github.com/jonatack/bitcoin/blob/doxygen-developer-notes-improvements/doc/developer-notes.md)

  Co-authored-by: Jon Layton <me@jonl.io>

ACKs for top commit:
  fanquake:
    ACK c902c4c0c6 - quick read, checked the new links work.
  laanwj:
    ACK c902c4c0c6

Tree-SHA512: 3b4cebba23061ad5243b2288c2006bf8527e74c689223825f96a44014875d15b2ab6ff54b8aa342ca657a14cf6ce3ab7d6e25bea5befd91162bc2645a74ddb7e
2020-01-14 10:02:26 +08:00
fanquake
a4a93a0bad
Merge #17906: gui: Set CConnman byte counters earlier to avoid uninitialized reads
8313fa8e81 gui: Set CConnman byte counters earlier to avoid uninitialized reads (Russell Yanofsky)

Pull request description:

  Initialize CConnman byte counters during construction, so GetTotalBytesRecv() and GetTotalBytesSent() methods don't return garbage before Start() is called.

  Change shouldn't have any effect outside of the GUI. It just fixes a race condition during a qt test that was observed on travis: https://travis-ci.org/bitcoin/bitcoin/jobs/634989685

ACKs for top commit:
  MarcoFalke:
    ACK 8313fa8e81
  promag:
    ACK 8313fa8e81.

Tree-SHA512: 97c246da4e28e6e0b48f685b840f96746ad75c4b157a692201c6c4702db328a88ead8507d8e1b4e608aa1882513174ec60cf3977c31b7a9d76678cc9f49b45f8
2020-01-14 08:53:34 +08:00
Pieter Wuille
9b66083788 Convert chain to new serialization 2020-01-13 08:24:44 -08:00
Pieter Wuille
2f1b2f4ed0 Convert VARINT to the formatter/Using approach 2020-01-13 08:24:44 -08:00
Pieter Wuille
ca62563df3 Add a generic approach for (de)serialization of objects using code in other classes
This adds the (internal) Wrapper class, and the Using function that uses it. Given
a class F that implements Ser(stream, const object&) and Unser(stream, object&)
functions, this permits writing e.g. READWRITE(Using<F>(object)).
2020-01-13 08:24:44 -08:00
Fabian Jahr
6fc554f591
wallet: Reset reused transactions cache
If a destination is reused we mark the cache of the other transactions going to that destination dirty so they are not accidentally reported as trusted when the cache is hit.
2020-01-13 13:40:06 +01:00
Wladimir J. van der Laan
2ed74a43a0
Merge #16945: refactor: introduce CChainState::GetCoinsCacheSizeState
02b9511d6b tests: add tests for GetCoinsCacheSizeState (James O'Beirne)
b17e91d842 refactoring: introduce CChainState::GetCoinsCacheSizeState (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

  ---

  This pulls out the routine for detection of how full the coins cache is from
  FlushStateToDisk. We use this logic independently when deciding when to flush
  the coins cache during UTXO snapshot activation ([see here](231fb5f17e (diff-24efdb00bfbe56b140fb006b562cc70bR5275))).

ACKs for top commit:
  ariard:
    Code review ACK 02b9511.
  ryanofsky:
    Code review ACK 02b9511d6b. Just rebase, new COIN_SIZE comment, and new test message since last review

Tree-SHA512: 8bdd78bf68a4a5d33a776e73fcc2857f050d6d102caa4997ed19ca25468c1358e6e728199d61b423033c02e6bc8f00a1d9da52cf17a2d37d70860fca9237ea7c
2020-01-13 12:42:38 +01:00
Wladimir J. van der Laan
f2f9fdf579
Merge #17910: build: remove double LIBBITCOIN_SERVER linking
831e1220bc build: remove double LIBBITCOIN_SERVER linking (fanquake)

Pull request description:

  Seems that this is no longer required. Have tested building on macOS and Debian.

ACKs for top commit:
  promag:
    ACK 831e1220bc.
  practicalswift:
    ACK 831e1220bc
  laanwj:
    ACK 831e1220bc

Tree-SHA512: d226d9fa0292189fae7e2af14781a511c3633f1352324f19ae642e941d06c34e2abf8b1df97d2330d76dba6024a93d8d341e02cc4882d7066f97e82585631fe1
2020-01-13 11:47:50 +01:00
fanquake
3d5d7aad26
windows: remove call to SetProcessDEPPolicy
SetProcessDEPPolicy() is only supported by 32-bit Windows processes. On 64-bit
Windows it fails with ERROR_NOT_SUPPORTED (DEP is always enabled on 64-bit).

More info:
https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setprocessdeppolicy
2020-01-13 16:40:50 +08:00
fanquake
f2645c2601
windows: Enable heap terminate-on-corruption
This is default behavior from Windows 8 onwards, however we still support
Windows 7, so it should make sense to explicitly enable this.

More info:
https://docs.microsoft.com/en-us/windows/win32/api/heapapi/nf-heapapi-heapsetinformation
2020-01-13 16:36:16 +08:00
fanquake
831e1220bc
build: remove double LIBBITCOIN_SERVER linking 2020-01-12 08:49:40 +08:00
fanquake
e258ce792a
Merge #17907: doc: Fix improper Doxygen inline comments
498cdbb426 Fix improper Doxygen inline comments (Ben Woosley)

Pull request description:

  The proper syntax is `//!<`
  http://www.doxygen.nl/manual/docblocks.html#memberdoc

  Identified via `-Wdocumentation`:

  ```
  In file included from ./util/system.h:26:
  ./util/settings.h:74:41: error: not a Doxygen trailing comment [-Werror,-Wdocumentation]
      const SettingsValue* begin() const; //<! Pointer to first non-negated value.
                                          ^~~~
                                          ///<
  ./util/settings.h:75:41: error: not a Doxygen trailing comment [-Werror,-Wdocumentation]
      const SettingsValue* end() const;   //<! Pointer to end of values.
                                          ^~~~
                                          ///<
  ./util/settings.h:76:41: error: not a Doxygen trailing comment [-Werror,-Wdocumentation]
      bool empty() const;                 //<! True if there are any non-negated values.
                                          ^~~~
                                          ///<
  ./util/settings.h:77:41: error: not a Doxygen trailing comment [-Werror,-Wdocumentation]
      bool last_negated() const;          //<! True if the last value is negated.
                                          ^~~~
                                          ///<
  ./util/settings.h:78:41: error: not a Doxygen trailing comment [-Werror,-Wdocumentation]
      size_t negated() const;             //<! Number of negated values.
                                          ^~~~
                                          ///<
  ```

ACKs for top commit:
  fanquake:
    ACK 498cdbb426

Tree-SHA512: 2851fc1cbbcf700d198d82ce4923b2ef4a700f8ce19dff431ecf24f4e6fecda9fed1b4b4d148f3c1adfb6b0c6bff5d5315ee01bbcd855eb3d83e1a69b0c98893
2020-01-11 12:20:15 +08:00
Ben Woosley
498cdbb426
Fix improper Doxygen inline comments
The proper syntax is "//!<"
http://www.doxygen.nl/manual/docblocks.html#memberdoc
2020-01-10 16:32:40 -08:00
fanquake
f8c69677a1
Merge #17893: qa: Fix double-negative arg test
8b2f471a1b qa: Fix double-negative arg test (Hennadii Stepanov)

Pull request description:

  Commit 67518f7cc61bf59ddfa0fd7c8dbbdec3653b9556 tests do not catch that a pointer is returned instead of a value.

  This PR makes test to not accept trailing characters after 0.

  From [IRC](http://www.erisian.com.au/bitcoin-core-dev/log-2020-01-07.html#l-358):
  >  \<hebasto\> ryanofsky: hmm, why test/functional/feature_config_args.py passed on 67518f7cc61bf59ddfa0fd7c8dbbdec3653b9556 ?
  >  \<hebasto\> I see now: test is broken.
  >  \<ryanofsky\> test should be unaffected by that change, do you see a break somewhere?
  >  \<hebasto\> yes: "-connect=0x7fff50369968" != "-connect=0"
  > ...
  >  \<ryanofsky\> Oh I see how that would happen, it should not be a problem in the current PR.
  >  \<hebasto\> going to submit a pr to fix test
  >  \<ryanofsky\> in the commit you mentioned, value is a pointer to a string, and it was printing the pointer address instead of the string on: LogPrintf("Warning: parsed potentially confusing double-negative -%s=%s\n", key, value);
  >  \<hebasto\> correct
  >  \<ryanofsky\> oh I see, test could be fixed to more robust and not accept trailing characters after 0

ACKs for top commit:
  ryanofsky:
    Code review ACK 8b2f471a1b. I don't know how you found this but it's a nice catch! This change should make the test more reliable.

Tree-SHA512: 454b3d4415771d353a2da766f6ae6e0bfae7bdf485aaa7bfdd323595282356eeaf3f40e556b39f753bc35f578cbe9684368887eef2d63c5d7f0d7d9fa971697a
2020-01-11 07:53:33 +08:00
fanquake
62b189b91d
Merge #17899: msvc: Ignore msvc linker warning and update to msvc build instructions.
0874a109da Ignore msvc linker warning and update to msvc build instructions. (Aaron Clauson)

Pull request description:

  - Update Visual Studio instructions.
  - Remove x64 platform conditional from bitcoin-qt project configuration.
  - Set use native environment toolset to fix linker warning.
  - Ignore linker warning about precompiled type information missing for test_bitcoin_qt.

ACKs for top commit:
  fanquake:
    ACK 0874a109da - tested building `bitcoind` and `bitcoin-qt`. Didn't open anything in Visual Studio.

Tree-SHA512: 83a4e4dfb8a52b024feadbf06bb1bf87993b6ebcb2a1b7dc3e2385815400f0beffc43591408b4abc8b6ffa406ce066c0af5028e7f53c707dca88ea5bba18346c
2020-01-11 07:35:00 +08:00
Russell Yanofsky
8313fa8e81 gui: Set CConnman byte counters earlier to avoid uninitialized reads
Initialize CConnman byte counters during construction, so GetTotalBytesRecv()
and GetTotalBytesSent() methods don't return garbage before Start() is called.

Change shouldn't have any effect outside of the GUI. It just fixes a race
condition during a qt test that was observed on travis:
https://travis-ci.org/bitcoin/bitcoin/jobs/634989685
2020-01-10 14:55:10 -05:00
Jim Posen
9dd58ca611 init: Stop indexes on shutdown after ChainStateFlushed callback.
Currently, the latest index state may not be committed to disk on shutdown.
2020-01-09 19:46:57 -05:00
Wladimir J. van der Laan
e7f8450357
Merge #16688: log: Add validation interface logging
f9abf4ab6d Add logging for CValidationInterface events (Jeffrey Czyz)
6edebacb21 Refactor FormatStateMessage for clarity (Jeffrey Czyz)
72f3227c83 Format CValidationState properly in all cases (Jeffrey Czyz)
428ac70095 Add VALIDATION to BCLog::LogFlags (Jeffrey Czyz)

Pull request description:

  Add logging of `CValidationInterface` callbacks using a new `VALIDATIONINTERFACE` log flag (see #12994). A separate flag is desirable as the logging can be noisy and thus may need to be disabled without affecting other logging.

  This could help debug issues where there may be race conditions at play, such as #12978.

ACKs for top commit:
  jnewbery:
    ACK f9abf4ab6d
  hebasto:
    ACK f9abf4ab6d
  ariard:
    ACK f9abf4a, only changes since 0cadb12 are replacing log indication `VALIDATIONINTERFACE` by `VALIDATION` and avoiding a forward declaration with a new include
  ryanofsky:
    Code review ACK f9abf4ab6d. Just suggested changes since last review (thanks!)

Tree-SHA512: 3e0f6e2c8951cf46fbad3ff440971d95d526df2a52a2e4d6452a82785c63d53accfdabae66b0b30e2fe0b00737f8d5cb717edbad1460b63acb11a72c8f5d4236
2020-01-09 21:05:35 +01:00
Aaron Clauson
0874a109da
Ignore msvc linker warning and update to msvc build instructions.
- Update Visual Studio instructions.
- Remove x64 platform conditional from bitcoin-qt project configuration.
- Set use native environment toolset to fix linker warning.
- Ignore linker warning about precompiled type information missing for test_bitcoin_qt.
2020-01-09 09:19:36 +00:00
Sebastian Falbesoner
ef63f5fc11 ci: Combine 32-bit build with CentOS 7 build 2020-01-08 23:36:46 +01:00
Hennadii Stepanov
2bede28cd9
util: Add PruneGBtoMiB() function
This commit does not change behavior.
2020-01-08 17:21:40 +02:00
Hennadii Stepanov
e35e4b2ba0
util: Add PruneMiBtoGB() function
Now the text of prune QCheckBox shows the space in GB instead of
thousands MiB, which is consistent with other parts of the GUI.
2020-01-08 17:21:34 +02:00
Wladimir J. van der Laan
6196e93001
Merge #16963: wallet: Fix unique_ptr usage in boost::signals2
6d6a7a8403 gui: Fix duplicate wallet showing up (João Barbosa)
81ea66c30e Drop signal CClientUIInterface::LoadWallet (Russell Yanofsky)

Pull request description:

  This PR includes 2 fixes:
   - prevent GUI LoadWallet handlers from crashing on startup when multiple handlers are attached, because the first handler takes ownership of the wallet unique pointer. Now every handler will receive its own unique pointer;

   - prevent showing a wallet twice in the GUI on startup due to a race with `loadwallet`.

  Fixes #16937

ACKs for top commit:
  fjahr:
    code review ACK 6d6a7a8403
  ryanofsky:
    Code review ACK 6d6a7a8403. No changes since last ACK other than rebase due to #17070
  kallewoof:
    Code review ACK 6d6a7a8403

Tree-SHA512: 7f0658c9011f81dfa176a094c2263448ee1d14fda7dc94e8b55ee9c8b81538bd2d1e4bf8a8dbfcd029ebfc9feb6d3cda9dee3f911122df0a4b1e0ca75f653ba4
2020-01-08 15:58:33 +01:00
Wladimir J. van der Laan
295211e668
Merge #17445: zmq: Fix due to invalid argument and multiple notifiers
3e730bf90a zmq: Fix due to invalid argument and multiple notifiers (João Barbosa)

Pull request description:

  ZMQ initialization is interrupted if any notifier fails, and in that case all notifiers are destroyed. The notifier shutdown assumes that the initialization had occurred. This is not valid when there are multiple notifiers and any except the last fails to initialize.

  Can be tested by running test/functional/interface_zmq.py from this branch with bitcoind from master.

  Closes #17185.

ACKs for top commit:
  laanwj:
    Code review ACK 3e730bf90a, thanks for adding a test

Tree-SHA512: 5da710e97dcbaa94896d019e75162d470f6d381ee07c60e5b3e9db93d11e8f7ca9bf2c509efa4486199e88c96c3e720cc96b4e35b62725d4c7db8e8e9bf6e09d
2020-01-08 15:20:34 +01:00
fanquake
7f3675b3ce
Merge #17696: qt: Force set nPruneSize in QSettings after the intro dialog
af112ab628 qt: Rename SetPrune() to InitializePruneSetting() (Hennadii Stepanov)
b0bfbe5028 refactor: Drop `bool force' parameter (Hennadii Stepanov)
68c9bbe9bc qt: Force set nPruneSize in QSettings after intro (Hennadii Stepanov)
a82bd8fa57 util: Replace magics with DEFAULT_PRUNE_TARGET_GB (Hennadii Stepanov)

Pull request description:

  On master (5622d8f315), having `QSettings` set already
  ```
  $ grep nPruneSize ~/.config/Bitcoin/Bitcoin-Qt-testnet.conf
  nPruneSize=6
  ```

  enabling prune option in the intro dialog

  ```
  $ ./src/qt/bitcoin-qt -choosedatadir -testnet
  ```
  ![DeepinScreenshot_select-area_20191208120425](https://user-images.githubusercontent.com/32963518/70388183-eed68580-19b6-11ea-9aa1-f9ad9aaa68a6.png)

  has no effect:
  ```
  $ grep Prune ~/.bitcoin/testnet3/debug.log
  2019-12-08T10:04:41Z Prune configured to target 5722 MiB on disk for block and undo files.
  ```

  ---

  With this PR:
  ```
  $ grep Prune ~/.bitcoin/testnet3/debug.log
  2019-12-08T10:20:35Z Prune configured to target 1907 MiB on disk for block and undo files.
  ```

  This PR has been split of #17453 (the first two commits) as it fixes an orthogonal bug.

  Refs:
  - https://github.com/bitcoin/bitcoin/pull/17453#discussion_r345424240
  - https://github.com/bitcoin/bitcoin/pull/17453#discussion_r350960201

ACKs for top commit:
  Sjors:
    Code review re-ACK af112ab628
  ryanofsky:
    Code review ACK af112ab628. Just suggested changes since last review (thanks!)
  promag:
    Tested ACK af112ab628. Latest suggestions and changes look good to me.

Tree-SHA512: 8ddad34b30dcc2cdcad6678ba8a0b36fa176e4e3465862ef6eee9be0f98d8146705138c9c7995dd8c0990af41078ca743fef1a90ed9240081f052f32ddec72b9
2020-01-08 22:03:49 +08:00