Commit Graph

22901 Commits

Author SHA1 Message Date
Bushstar
e80317be5f
refactor: Remove redundant conditional 2020-01-21 14:07:42 +00:00
Wladimir J. van der Laan
631df3ee87
Merge #17916: windows: Enable heap terminate-on-corruption
3d5d7aad26 windows: remove call to SetProcessDEPPolicy (fanquake)
f2645c2601 windows: Enable heap terminate-on-corruption (fanquake)

Pull request description:

  This PR is currently two separate changes:

  #### 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. This is also done by projects like tor, chromium etc.

  > Enables the terminate-on-corruption feature. If the heap manager detects an error in any heap used by the process, it calls the Windows Error Reporting service and terminates the process.
  After a process enables this feature, it cannot be disabled.

  More info [here](https://docs.microsoft.com/en-us/windows/win32/api/heapapi/nf-heapapi-heapsetinformation).

  #### Remove call to SetProcessDEPPolicy()

  DEP is always enabled on 64-bit Windows processes, and `SetProcessDEPPolicy()` only works when called from a 32-bit process. I've tested that our current usage always fails ([as expected](https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setprocessdeppolicy#remarks)) with [ERROR_NOT_SUPPORTED](16151c441e/mingw-w64-headers/include/error.h (L42)).

  Please don't add a "Needs gitian build" tag here yet.

ACKs for top commit:
  sipsorcery:
    ACK 3d5d7aad26.
  laanwj:
    ACK 3d5d7aad26

Tree-SHA512: 0948bcf165685b6b573f2cd950680c34356b856690de655ced2b93d497e02e7b22aa195c99f6ce33202f182622c67302ff31c98ab51b7d050574af3debdee5ce
2020-01-20 20:55:13 +01:00
Wladimir J. van der Laan
daae6403d8
Merge #17777: tests: Add fuzzing harness for DecodeHexTx(…)
3f95fb085e build: Sort fuzzing harnesses to avoid future merge conflicts (practicalswift)
bcad0144ef tests: Add fuzzing harness for DecodeHexTx(...) (practicalswift)

Pull request description:

  Add fuzzing harness for `DecodeHexTx(…)`.

  To test this PR:

  ```
  $ make distclean
  $ ./autogen.sh
  $ CC=clang CXX=clang++ ./configure --enable-fuzz \
        --with-sanitizers=address,fuzzer,undefined
  $ make
  $ src/test/fuzz/decode_tx
  …
  ```

ACKs for top commit:
  jonatack:
    ACK 3f95fb0

Tree-SHA512: 0f476d0cc26f1e03812664373118754042074bdab6c1e3a57c721f863feb82ca2986cceeaceb03192d893b9aa1d4ad8a5fb4c74824b9547fd8567805931a9ebd
2020-01-20 20:38:57 +01:00
Wladimir J. van der Laan
5d2ff75e20
Merge #17945: doc: Fix doxygen errors
297e098557 Fix doxygen errors (Ben Woosley)

Pull request description:

  These are all the remaining errors identified via -Werror=documentation, e.g.:
  ```
    ./rpc/rawtransaction_util.h:31:13: error: parameter 'prevTxs' not found in the function declaration [-Werror,-Wdocumentation]
      * @param  prevTxs       Array of previous txns outputs that tx depends on but may not yet be in the block chain
                ^~~~~~~
    ./rpc/rawtransaction_util.h:31:13: note: did you mean 'prevTxsUnival'?
      * @param  prevTxs       Array of previous txns outputs that tx depends on but may not yet be in the block chain
                ^~~~~~~
                prevTxsUnival

    netbase.cpp:766:11: error: parameter 'outProxyConnectionFailed[out]' not found in the function declaration [-Werror,-Wdocumentation]
     * @param outProxyConnectionFailed[out] Whether or not the connection to the
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    netbase.cpp:766:11: note: did you mean 'outProxyConnectionFailed'?
     * @param outProxyConnectionFailed[out] Whether or not the connection to the
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              outProxyConnectionFailed
  ```

  You can use this to run with `-Wdocumentation` yourself: #14920

ACKs for top commit:
  laanwj:
    ACK 297e098557

Tree-SHA512: a232d893b170873d923e77fa56c56a6567e7fd120b5af1f52cfeeae1093eec55621604cc80a523678f6fedc8bbb31228c4aa8dc2a630ce9ffc91525988522af7
2020-01-20 20:35:17 +01:00
Wladimir J. van der Laan
7e841f3f9b
Merge #17823: scripts: Read suspicious hosts from a file instead of hardcoding
e1c582cbaa contrib: makeseeds: Read suspicious hosts from a file instead of hardcoding (Sanjay K)

Pull request description:

  referring to: https://github.com/bitcoin/bitcoin/issues/17020
  good first issue: reading SUSPICIOUS_HOSTS from a file.
  I haven't changed the base hosts that were included in the original source, just made it readable from a file.

ACKs for top commit:
  practicalswift:
    ACK e1c582cbaa -- diff looks correct

Tree-SHA512: 18684abc1c02cf52d63f6f6ecd98df01a9574a7c470524c37e152296504e2e3ffbabd6f3208214b62031512aeb809a6d37446af82c9f480ff14ce4c42c98e7c2
2020-01-20 20:24:38 +01:00
Hennadii Stepanov
70e4706093
Revert "refactor: Remove never used default parameter"
This reverts commit 7d0a8f4f53.
2020-01-19 09:38:51 +02:00
Hennadii Stepanov
219417b388
Revert "refactor: Simplify connection syntax"
This reverts commit 1a53b0da60.
2020-01-19 09:37:34 +02:00
Pieter Wuille
ca34c5cba5 Add FORMATTER_METHODS, similar to SERIALIZE_METHODS, but for formatters 2020-01-18 07:43:22 -08:00
fanquake
a654626f07
Merge #17896: Serialization improvements (step 2)
9b66083788 Convert chain to new serialization (Pieter Wuille)
2f1b2f4ed0 Convert VARINT to the formatter/Using approach (Pieter Wuille)
ca62563df3 Add a generic approach for (de)serialization of objects using code in other classes (Pieter Wuille)

Pull request description:

  This is a second carve-out from #10785.

  This introduces a const-correct generic approach for serializing objects using custom serializers (defined separately from the object being serialized), then converts VARINT to use that approach, and then converts chain.h to the new framework (including the new const-correct VARINT macro).

ACKs for top commit:
  jamesob:
    ACK 9b66083788 ([`jamesob/ackr/17896.1.sipa.serialization_improvemen`](https://github.com/jamesob/bitcoin/tree/ackr/17896.1.sipa.serialization_improvemen))
  ryanofsky:
    Code review ACK 9b66083788. Only change since last review is suggested lvalue reference tweak

Tree-SHA512: 2da4af1754699cb223d6beae44c587555e39ef6951448488a04783c92e2dfd4a305934f71cc3a75d06faf6d722723d8cdbd5ccb12039783f8d62039b83987bb8
2020-01-18 08:59:00 +08:00
fanquake
0deba68064
Merge #17943: qt, refactor: Remove never used default parameter
1a53b0da60 refactor: Simplify connection syntax (Hennadii Stepanov)
7d0a8f4f53 refactor: Remove never used default parameter (Hennadii Stepanov)

Pull request description:

  In `BitcoinGUI::message()` slot the `bool* ret = nullptr` parameter is never used.

  This PR removes it and simplifies connections syntax by replacing lambdas with the `&BitcoinGUI::message` slot.

ACKs for top commit:
  promag:
    Code review ACK 1a53b0da60.
  Sjors:
    Tested ACK 1a53b0da60
  Empact:
    Code review ACK 1a53b0da60

Tree-SHA512: e287c3218d31a387338d50da3de79c27e8691829449c3a75a2f75bb1c680bd81eb9de43e4dd3646560a422d4a45c84debfce9783c4376b50aa5cde491f300688
2020-01-17 20:33:15 +08:00
fanquake
c20fbb7be8
Merge #17939: gui: Remove warning "unused variable 'wallet_model'"
c279a81e9c gui: Remove warning "unused variable 'wallet_model'" (João Barbosa)

Pull request description:

  This was part of the abandoned #15150.

ACKs for top commit:
  theStack:
    utACK c279a81e9c
  fanquake:
    ACK c279a81e9c - tested wallet loading/unloading in the qt rpc console.

Tree-SHA512: 8fbd55c7e213599c7be843b52e960a16cf965b3e01489f426ac3ed9d579d78bb4b2ac230bcccd8abe0397a8b1166ee10e0d685738441a77a5dcb5135c15790fa
2020-01-17 16:10:05 +08:00
fanquake
2ddf041a8d
Merge #17928: depends: Consistent use of package variable
22c5a986e9 depends: Consistent use of package variable (Peter Bushnell)

Pull request description:

  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.

ACKs for top commit:
  fanquake:
    ACK 22c5a986e9 - tested a `make boost -C depends/ -j8`.

Tree-SHA512: 41766a328603db2ebb1f23ea0c5b2936de043587dd86396eaba73524d2f5bdeff25447040e33d61de2ef612a920281cd81c6fac097913270287f344beb839c5d
2020-01-17 15:02:27 +08:00
Ben Woosley
297e098557
Fix doxygen errors
Identified via -Wdocumentation, e.g.:

  ./rpc/rawtransaction_util.h:31:13: error: parameter 'prevTxs' not found in the function declaration [-Werror,-Wdocumentation]
    * @param  prevTxs       Array of previous txns outputs that tx depends on but may not yet be in the block chain
              ^~~~~~~
  ./rpc/rawtransaction_util.h:31:13: note: did you mean 'prevTxsUnival'?
    * @param  prevTxs       Array of previous txns outputs that tx depends on but may not yet be in the block chain
              ^~~~~~~
              prevTxsUnival

  netbase.cpp:766:11: error: parameter 'outProxyConnectionFailed[out]' not found in the function declaration [-Werror,-Wdocumentation]
   * @param outProxyConnectionFailed[out] Whether or not the connection to the
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  netbase.cpp:766:11: note: did you mean 'outProxyConnectionFailed'?
   * @param outProxyConnectionFailed[out] Whether or not the connection to the
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            outProxyConnectionFailed
2020-01-16 18:25:11 -08:00
Samuel Dobson
7fb94c0ed4
Merge #17889: wallet: Improve CWallet:MarkDestinationsDirty
2b1641492f wallet: Improve CWallet:MarkDestinationsDirty (João Barbosa)

Pull request description:

  Improve `CWallet:MarkDestinationsDirty` by skipping transactions that already have the cache invalidated. Skipping a transaction avoids at worst case extracting all output destinations.

ACKs for top commit:
  meshcollider:
    re-utACK 2b1641492f

Tree-SHA512: 479dc2dde4b653b856e3d6a0c59a34fe33e963eb131a2d88552a8b30471b8725a087888fe5d7db6e4ee19b74072fe64441497f033be7d1931637f756e0d8fef5
2020-01-17 14:15:33 +13:00
João Barbosa
2b1641492f wallet: Improve CWallet:MarkDestinationsDirty 2020-01-17 01:12:17 +00:00
MarcoFalke
95ca6aeec7
Merge #17691: doc: Add missed copyright headers
fac86ac7b3 scripted-diff: Add missed copyright headers (Hennadii Stepanov)
6fde9d5e47 script: Update EXLUDE list in copyright_header.py (Hennadii Stepanov)
1998152f15 script: Add empty line after C++ copyright (Hennadii Stepanov)
071f2fc204 script: Add ability to insert copyright to *.sh (Hennadii Stepanov)

Pull request description:

  This PR improves `contrib/devtools/copyright_header.py` script and adds copyright headers to the files in `src` and `test` directories with two exceptions:
  - [`src/reverse_iterator.h`](https://github.com/bitcoin/bitcoin/blob/master/src/reverse_iterator.h) (added to exceptions)
  - [`src/test/fuzz/FuzzedDataProvider.h`](https://github.com/bitcoin/bitcoin/blob/master/src/test/fuzz/FuzzedDataProvider.h) (added to exceptions)

  On master 5622d8f315:
  ```
  $ ./contrib/devtools/copyright_header.py report . | grep zero
    25 with zero copyrights
  ```

  With this PR:
  ```
  $ ./contrib/devtools/copyright_header.py report . | grep zero
     2 with zero copyrights
  ```

  ~I am uncertain about our copyright policy with `build_msvc` and `contrib` directories content, so they are out of scope of this PR.~

ACKs for top commit:
  MarcoFalke:
    ACK fac86ac7b3

Tree-SHA512: d7832c4a7a1a3b7806119775b40ec35d7982f49ff0e6199b8cee4c0e0a36e68d51728b6ee9924b1c161df4bc6105bd93391b79d42914357fa522f499cb113fa8
2020-01-16 15:58:35 -05:00
MarcoFalke
2aaeca50b2
Merge #17900: ci: Combine 32-bit build with CentOS 7 build
ef63f5fc11 ci: Combine 32-bit build with CentOS 7 build (Sebastian Falbesoner)

Pull request description:

  Combines the CentOS build with the 32-bit (i686) build to avoid Travis bottlenecks, as suggested in #17757 by MarcoFalke. This keeps most of the properties of the 32-bit build (dash as config shell, building QT5 GUI) and just builds it with depends inside the CentOS docker container.

  Making the depends in `05_before_script.sh` with unset config shell (`CONFIG_SHELL=`)

  6196e93001/ci/test/05_before_script.sh (L28)

  caused problems for building the library libevent (resulting in a Makefile with no shell set (`SHELL=`)), that's why I set it explicitely to `/bin/bash` if we have a CentOS Docker container.

  A Travis output of this 32-bit CentOS build can be seen here: https://travis-ci.org/theStack/bitcoin/jobs/634472394 (has been restarted once due to too long build time and appearance of the `CACHE_ERR_MSG`).

  For anyone wanting to verify the outputs, I found these instructions useful to reproduce a Travis build locally: https://github.com/erdc/proteus/wiki/Replicating-the-TravisCI-Environment-on-your-Local-Machine (steps 1-3). In this case it's a bit tricky since you run Docker inside Docker -- within the Travis Docker container, the CentOS Docker container is created. To make this possible, the Docker socket has to be exposed to the Travis container via bind-mounting (`docker run -v /var/run/docker.sock:/var/run/docker.sock ...`), as suggested in https://stackoverflow.com/a/33003273.

Top commit has no ACKs.

Tree-SHA512: af508241cec3a10a66c37673d56691717b78375340e910fcdd3fb3870741eba623a436e1e85b26b54f013375611896f5411c5a7fec2437d367d27172230129fe
2020-01-16 15:45:24 -05:00
MarcoFalke
ec9b964cc9
Merge #17541: test: add functional test for non-standard bare multisig txs
1be0b1fb2a test: add functional test for non-standard bare multisig txs (Sebastian Falbesoner)

Pull request description:

  Approaches another missing functional test of issue #17394 (counterpart to unit test in PR #17502): A transaction is rejected by the mempool with reason `"bare-multisig"` if any of the outputs' scriptPubKey has bare multisig format (`M <PubKey1> <PubKey2> ... <PubKeyN> N OP_CHECKSIG`) and bitcoind is started with the argument `-permitbaremultisig=0`.

ACKs for top commit:
  instagibbs:
    utACK 1be0b1fb2a
  kristapsk:
    ACK 1be0b1fb2a

Tree-SHA512: 2cade68c4454029b62278b38d0f137c2605a0e4450c435cdda2833667234edd4406f017ed12fa8df9730618654acbaeb68b16dcabb9f5aa84bad9f1c76c6d476
2020-01-16 15:41:34 -05:00
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
Sebastian Falbesoner
4537ba5f21 test: add unit test for non-standard txs with too large tx size
The function IsStandardTx() returns rejection reason "tx-size" if the
transaction weight is larger than MAX_STANDARD_TX_WEIGHT (=400000 vbytes).
2020-01-16 15:10:28 +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
João Barbosa
9a5b5ee81f wallet: Replace %w by wallet name in -walletnotify script
Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
2020-01-15 11:47:26 +00: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
Jeremy Rubin
bd5a026928 Make UpdateTransactionsFromBlock use Epochs 2020-01-14 19:30:13 -08:00
Jeremy Rubin
2ccb7cca4a Add Epoch Guards to CTXMemPoolEntry and CTxMemPool 2020-01-14 19:30:13 -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