Commit graph

24239 commits

Author SHA1 Message Date
MarcoFalke fbd522721c
Merge #18885: contrib: Move optimize-pngs.py script to the maintainer repo
fa13090d20 contrib: Remove optimize-pngs.py script, which lives in the maintainer repo (MarcoFalke)

Pull request description:

  Moved to https://github.com/bitcoin-core/bitcoin-maintainer-tools/blob/master/optimize-pngs.py

  Bitcoin Core should focus on the full node implementation, not on scripts to compress png images.

  This script is only used when new PNG files are added to the repo. This happens about once every two years. So fetching the script from the other repo should not be a burden, but removing it from this repo is going to cut down on the meta files we need to maintain in the main repo.

ACKs for top commit:
  practicalswift:
    ACK fa13090d20 -- `+0 lines, -82 lines` :)
  promag:
    ACK fa13090d20.
  hebasto:
    ACK fa13090d20, verified that script is already [moved](https://github.com/bitcoin-core/bitcoin-maintainer-tools/pull/56).

Tree-SHA512: 37d111adae769bcddc6ae88041032d5a2b8b228fec67f555c8333c38de3992f5138b30bea868d7d6d6b7f966a47133e5853134373b149ab23cba3b8b560ecb31
2020-05-05 10:40:39 -04:00
MarcoFalke 52ce396b2a
Merge #18879: valgrind: remove outdated suppressions
d7120f7f78 valgrind : remove duplicate BCLog::Logger suppression (fanquake)
708e3c7e85 valgrind: remove rest_blockhash_by_height suppression (fanquake)

Pull request description:

  708e3c7e85: `Suppress rest_blockhash_by_height` should no longer be needed after #18785.

  d7120f7f78 : Removes a duplicate `Suppress BCLog::Logger::StartLogging()` suppression that was added in #17770.

ACKs for top commit:
  MarcoFalke:
    ACK d7120f7f78
  practicalswift:
    ACK d7120f7f78 -- patch looks correct and valgrind Travis job is happy

Tree-SHA512: 45f5b9fa64bf83cada3cd9ad33c245f660376d5b29f51a2531d83133940090df945f5ef26c5847d6ec024ffab9528d55573c5cf9ca5e73795f9abfc971b3d29b
2020-05-05 10:06:35 -04:00
Vasil Dimov a30b0a24e9
build: enable -Werror=gnu
Stop the build if a warning is emitted due to `-Wgnu` and
`--enable-werror` has been used. As usual - this would help notice such
a warning that is about to be introduced in new code.

This is a followup to
https://github.com/bitcoin/bitcoin/pull/18088
build: ensure we aren't using GNU extensions
2020-05-05 14:47:59 +02:00
MarcoFalke fa13090d20
contrib: Remove optimize-pngs.py script, which lives in the maintainer repo
https://github.com/bitcoin-core/bitcoin-maintainer-tools/blob/master/optimize-pngs.py
2020-05-05 07:25:58 -04:00
glowang be01449cc8 Add test for param interaction b/w -blocksonly and -whitelistforcerelay 2020-05-04 21:57:47 -07:00
Andrew Chow ca2a09640f Change SetType to SetInternal and remove m_address_type
m_address_type was used for two things:
1. Determine the type of descriptor to generate during
   SetupDescriptorGeneration
2. Sanity check during GetNewDestination.

There is no need to have this variable to accomplish those things.
1. Add a argument to SetupDescriptorGeneration indicating the address
   type to use
2. Use Descriptor::GetOutputType for the sanity check.
2020-05-05 00:24:46 -04:00
Andrew Chow 89b1ce1140 Remove unimplemented SetCrypted from DescriptorScriptPubKeyMan 2020-05-05 00:24:06 -04:00
Andrew Chow b9073c8f13 rpc: createwallet warning that descriptor wallets are experimental 2020-05-05 00:24:06 -04:00
Andrew Chow 610030d95c docs: Add release notes for descriptor wallets 2020-05-05 00:24:00 -04:00
Samuel Dobson ec79b5f86b
Merge #18782: wallet: Make sure no DescriptorScriptPubKeyMan or WalletDescriptor members are left uninitialized after construction
2a78098098 wallet: Make sure no WalletDescriptor members are uninitialized after construction (practicalswift)
ff046aeeba wallet: Make sure no DescriptorScriptPubKeyMan members are uninitialized after construction (practicalswift)

Pull request description:

  This is a small folllow-up to #16528 ("Native Descriptor Wallets using DescriptorScriptPubKeyMan") which was merged in to `master` a couple of hours ago.

  Make sure no `DescriptorScriptPubKeyMan` or `WalletDescriptor` members are left uninitialized after construction.

  Before this change `bool m_internal` was left uninitialized when using the `DescriptorScriptPubKeyMan(WalletStorage&, WalletDescriptor&)` ctor.

  The same goes for the now initialized integers which were left uninitialized when using the `WalletDescriptor()` ctor.

ACKs for top commit:
  instagibbs:
    utACK  2a78098098
  fjahr:
    Code review ACK 2a78098098
  Sjors:
    utACK 2a78098
  achow101:
    ACK 2a78098098
  brakmic:
    Code review ACK 2a78098098
  meshcollider:
    utACK 2a78098098

Tree-SHA512: c98e035268fdc7f65a423b73ac0cf010b0ef7c5e679b3cf170c1813efac8ab5c657dcbaf43c746770bea59e4772bfefe4caa834f1175260c39c7f35d92946ba5
2020-05-05 15:56:04 +12:00
Hennadii Stepanov 0c63f80854
build: Suppress -Wdeprecated-copy warnings 2020-05-05 06:21:52 +03:00
fanquake d7120f7f78
valgrind : remove duplicate BCLog::Logger suppression
This was added in #17770, but is identical to the supression above.
2020-05-05 11:10:36 +08:00
fanquake 708e3c7e85
valgrind: remove rest_blockhash_by_height suppression
This should no-longer be necessary after #18785.
2020-05-05 11:10:35 +08:00
Russell Yanofsky f963a68051 test: Add test for conflicted wallet tx notifications
Add test coverage for conflicted wallet transaction notifications so we improve
current behavior and avoid future regressions

https://github.com/bitcoin/bitcoin/pull/9240 - accidental break
https://github.com/bitcoin/bitcoin/issues/9479 - bug report
https://github.com/bitcoin/bitcoin/pull/9371 - fix
https://github.com/bitcoin/bitcoin/pull/16624 - accidental break
https://github.com/bitcoin/bitcoin/issues/18325 - bug report
https://github.com/bitcoin/bitcoin/pull/18600 - potential fix
2020-05-04 22:27:19 -04:00
Hennadii Stepanov 18bd83b1fe
util: Cleanup translation.h 2020-05-05 04:51:29 +03:00
Hennadii Stepanov e95e658b8e
doc: Do not translate technical or extremely rare errors 2020-05-05 04:46:08 +03:00
Hennadii Stepanov 7e923d47ba
Make InitError bilingual 2020-05-05 04:46:04 +03:00
Hennadii Stepanov 917ca93553
Make ThreadSafe{MessageBox|Question} bilingual 2020-05-05 04:45:59 +03:00
Hennadii Stepanov 23b9fa2e5e
gui: Add detailed text to BitcoinGUI::message 2020-05-05 04:40:56 +03:00
fanquake e727c2bdca
Merge #18088: build: ensure we aren't using GNU extensions
0ae8f18dfe build: add -Wgnu to compile flags (fanquake)
3a0fd7726b Remove use of non-standard zero variadic macros (Ben Woosley)
49f6178c3e Drop unused LOG_TIME_MICROS helper (Ben Woosley)
5d4999951e prevector: Avoid unnamed struct, which is a GNU extension (DesWurstes)

Pull request description:

  Since we [started using](https://github.com/bitcoin/bitcoin/pull/7165) the `ax_cxx_compile_stdcxx.m4` macro we've been passing `[noext]` to indicate that we don't want to use an extended mode, i.e GNU extensions. Speaking to Cory he clarified that the intention was to "require only vanilla c++11 and turn _off_ extension support so they would fail to compile".

  However in the codebase we are currently making use of some GNU extensions. We should either remove there usage, or at least amend our CXX compiler checks. I'd prefer the former.

  #### anonymous structs
  ```bash
  ./prevector.h:153:9: warning: anonymous structs are a GNU extension [-Wgnu-anonymous-struct]
          struct {
  ```

  This is fixed in b849212c1e.

  #### variadic macros

  ```bash
  ./undo.h:57:50: warning: must specify at least one argument for '...' parameter of variadic macro [-Wgnu-zero-variadic-macro-arguments]
              ::Unserialize(s, VARINT(nVersionDummy));
  ```

  This is taken care of in #18087.

  The `LOG_TIME_*` macros introduced in #16805 make use of a [GNU extension](https://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html).

  ```bash
  In file included from validation.cpp:22:
  ./logging/timer.h:99:99: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
      BCLog::Timer<std::chrono::milliseconds> PASTE2(logging_timer, __COUNTER__)(__func__, end_msg, ## __VA_ARGS__)
                                                                                                    ^
  ./logging/timer.h:99:99: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
  ./logging/timer.h:99:99: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
  ./logging/timer.h:99:99: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
  ./logging/timer.h:99:99: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
  ./logging/timer.h:101:92: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
      BCLog::Timer<std::chrono::seconds> PASTE2(logging_timer, __COUNTER__)(__func__, end_msg, ## __VA_ARGS__)
                                                                                             ^
  6 warnings generated.
  ```

  This is fixed in 081a0ab64eb442bc85c4d4a4d3bc2c8e97ac2a6d and 612e8e138b97fc5ad2f38847300132a8fc423c3f.

  #### prevention
  To ensure that usage doesn't creep back in we can add [`-Wgnu`](https://clang.llvm.org/docs/DiagnosticsReference.html#wgnu) to our compile time flags, which will make Clang warn whenever it encounters GNU extensions.

  This would close #14130.
  Also related to #17230, where it's suggested we use a GNU extension, the `gnu::pure` attribute.

ACKs for top commit:
  practicalswift:
    ACK 0ae8f18dfe -- diff looks correct
  MarcoFalke:
    ACK 0ae8f18dfe
  vasild:
    utACK 0ae8f18df
  dongcarl:
    ACK 0ae8f18dfe

Tree-SHA512: c517404681ef8edf04c785731d26105bac9f3c9c958605aa24cbe399c649e7c5ee0c4aa8e714fd2b2d335e2fbea4d571e09b0dec36678ef871f0a6683ba6bb7f
2020-05-05 07:44:23 +08:00
Carl Dong bfe1ba2f5b
rel-builds: Specify core.abbrev for git-rev-parse
Chose 12 because the kernel uses it:

  https://public-inbox.org/git/CA+55aFy0_pwtFOYS1Tmnxipw9ZkRNCQHmoYyegO00pjMiZQfbg@mail.gmail.com/raw

And also because it's a nice number.
2020-05-04 13:00:08 -04:00
Hennadii Stepanov c269e618cf
Drop unused GIT_COMMIT_DATE macro 2020-05-04 19:53:58 +03:00
Hennadii Stepanov 8f9f4ba5e2
refactor: Remove duplicated code 2020-05-04 19:53:21 +03:00
MarcoFalke fa47cf9d95
wallet: Fix typo in assert that is compile-time true 2020-05-04 10:40:48 -04:00
Wladimir J. van der Laan b549cb1bd2
Merge #18443: lockedpool: avoid sensitive data in core files (FreeBSD)
f85203097f lockedpool: avoid sensitive data in core files (FreeBSD) (Vasil Dimov)

Pull request description:

  This is a followup to
  23991ee53 / https://github.com/bitcoin/bitcoin/pull/15600
  to also use madvise(2) on FreeBSD to avoid sensitive data allocated
  with secure_allocator ending up in core files in addition to preventing
  it from going to the swap.

ACKs for top commit:
  sipa:
    ACK f85203097f if someone verifies this works as intended on *BSD.
  laanwj:
    ACK f85203097f
  practicalswift:
    Code-review ACK f85203097f assuming a reviewer with FreeBSD access verifies that the PR goal is achieved :)

Tree-SHA512: 2e6d4ab6a9fbe18732c8ba530eacc17f58128c97140758b80c905b5b838922a2bcaa5f9abc45ab69d5a1a2baa0cba322f006048b60a877228e089c7e64dadd2a
2020-05-04 16:31:07 +02:00
Wladimir J. van der Laan 23c926d859
Merge #18699: wallet: Avoid translating RPC errors
fa2cce4391 wallet: Remove trailing whitespace from potential translation strings (MarcoFalke)
fa59cc1c97 wallet: Report full error message in wallettool (MarcoFalke)
fae7776690 wallet: Avoid translating RPC errors when creating txs (MarcoFalke)
fae51a5c6f wallet: Avoid translating RPC errors when loading wallets (MarcoFalke)

Pull request description:

  Common errors and warnings should be translated when displayed in the
  GUI, but not translated when displayed elsewhere. The wallet method
  `CreateWalletFromFile` does not know its caller, so this commit changes it
  to return a `bilingual_str` to the caller.

  Fixes #17072

ACKs for top commit:
  laanwj:
    ACK fa2cce4391, checked that no new translation messages are added compared to master.
  hebasto:
    ACK fa2cce4391

Tree-SHA512: c6a943ae9c3689ea3c48c20d26de6e4970de0257a1f1eec57a2bded67a4af9dcc5c45b2d64659d6fb4c4bc4d8103e28483ea3d14bb850df8db0ff9e8e5c77ee2
2020-05-04 16:29:22 +02:00
Wladimir J. van der Laan 42fd503819
Merge #18786: init: Remove boost from ThreadImport
faec3dc2ad init: Remove boost from ThreadImport (MarcoFalke)

Pull request description:

  Can be tested by calling `-reindex` or `-loadblock` and then pressing `CTRL`+`C`.

  Should print something like:

  ```
  ...
  2020-04-27T19:34:31Z [loadblk] Reindexing block file blk00005.dat...
  ^C2020-04-27T19:34:32Z [loadblk] Shutdown requested. Exit ThreadImport
  2020-04-27T19:34:32Z [qt-init] Interrupting HTTP server
  ...
  ```

ACKs for top commit:
  laanwj:
    Code review ACK faec3dc2ad
  hebasto:
    ACK faec3dc2ad, tested on Linux Mint 19.3 (x86_64) both `bitcoind` and `bitcoin-qt` binaries.

Tree-SHA512: e105af18d98296d82ec99f48e478cf44577e3c32f7e4b47617a7bc7cbf71d6becb92722f229a1be38d58ad29712704509ad9740d8ab8cd3104cf90057664b437
2020-05-04 16:06:42 +02:00
MarcoFalke 0a729b0e42
Merge #18783: tests: Add fuzzing harness for MessageSign, MessageVerify and other functions in util/message.h
38e49ded8b tests: Add fuzzing harness for MessageSign, MessageVerify and other functions in util/message.h (practicalswift)

Pull request description:

  Add fuzzing harness for `MessageSign`, `MessageVerify` and other functions in `util/message.h`.

  See [`doc/fuzzing.md`](https://github.com/bitcoin/bitcoin/blob/master/doc/fuzzing.md) for information on how to fuzz Bitcoin Core. Don't forget to contribute any coverage increasing inputs you find to the [Bitcoin Core fuzzing corpus repo](https://github.com/bitcoin-core/qa-assets).

  Happy fuzzing :)

ACKs for top commit:
  vasild:
    utACK 38e49ded8b

Tree-SHA512: 4f83718365d9c7e772a4ccecb31817bf17117efae2bfaf6e9618ff17908def0c8b97b5fa2504d51ab38b2e6f82c046178dd751495cc37ab4779c0b1ac1a4d211
2020-05-04 09:02:21 -04:00
MarcoFalke fae153b409
test: Fix verack race to avoid intermittent test failures 2020-05-04 08:56:30 -04:00
MarcoFalke 74a1152f25
Merge #18859: Remove CCoinsViewCache::GetValueIn(...)
b56607a89b Remove CCoinsViewCache::GetValueIn(...) (practicalswift)

Pull request description:

  Remove `CCoinsViewCache::GetValueIn(...)`.

  Fixes #18858.

  It seems like `GetValueIn` was added in #748 ("Pay-to-script-hash (OP_EVAL replacement)", merged in 2012) and the last use in validation code was removed in #8498 ("Near-Bugfix: Optimization: Minimize the number of times it is checked that no money...", merged in 2017).

  `CCoinsViewCache::GetValueIn(…)` performs money summation like this:

  ```c++
  CAmount CCoinsViewCache::GetValueIn(const CTransaction& tx) const
  {
      if (tx.IsCoinBase())
          return 0;

      CAmount nResult = 0;
      for (unsigned int i = 0; i < tx.vin.size(); i++)
          nResult += AccessCoin(tx.vin[i].prevout).out.nValue;

      return nResult;
  }
  ```

  Note that no check is done to make sure that the resulting `nResult` is such that it stays within the money bounds (`MoneyRange(nResult)`), or that the summation does not trigger a signed integer overflow.

  Proof of concept output:

  ```
  coins.cpp:243:17: runtime error: signed integer overflow: 9223200000000000000 + 2100000000000000 cannot be represented in type 'long'
  GetValueIn = -9221444073709551616
  ```

  Proof of concept code:

  ```c++
  CMutableTransaction mutable_transaction;
  mutable_transaction.vin.resize(4393);

  Coin coin;
  coin.out.nValue = MAX_MONEY;
  assert(MoneyRange(coin.out.nValue));

  CCoinsCacheEntry coins_cache_entry;
  coins_cache_entry.coin = coin;
  coins_cache_entry.flags = CCoinsCacheEntry::DIRTY;

  CCoinsView backend_coins_view;
  CCoinsViewCache coins_view_cache{&backend_coins_view};
  CCoinsMap coins_map;
  coins_map.emplace(COutPoint{}, std::move(coins_cache_entry));
  coins_view_cache.BatchWrite(coins_map, {});

  const CAmount total_value_in = coins_view_cache.GetValueIn(CTransaction{mutable_transaction});
  std::cout << "GetValueIn = " << total_value_in << std::endl;
  ```

ACKs for top commit:
  MarcoFalke:
    ACK b56607a89b
  promag:
    Code review ACK b56607a89b.
  jb55:
    ACK b56607a89b
  hebasto:
    ACK b56607a89b, I have not tested the code, but I have reviewed it and it looks OK, I agree it can be merged.

Tree-SHA512: 2c8402b5753ec96703d12c57c3eda8eccf999ed3519134a87faaf0838cfe44b94ef384296af2a524c06c8756c0245418d181af9083548e360905fac9d79215e6
2020-05-04 07:48:23 -04:00
Sjors Provoost 9c246b873c
[test] backwards compatibility: bump v0.19.0.1 to v0.19.1 2020-05-04 13:36:40 +02:00
Sjors Provoost 89a28e02fa
[test] add v0.16.3 backwards compatibility test 2020-05-04 13:36:40 +02:00
João Barbosa e8123eae40 gui: Fix itemWalletAddress leak when not tree mode 2020-05-04 12:05:42 +01:00
Jonas Schnelli afa577c323
Merge #15768: gui: Add close window shortcut
f5a3a5b9ab gui: Add close window shortcut (Miguel Herranz)

Pull request description:

  CMD+W is the standard shortcut in macOS to close a window without
  exiting the program.

  This adds support to use the shortcut in both main and debug windows.

ACKs for top commit:
  jonasschnelli:
    Tested ACK f5a3a5b9ab
  hebasto:
    ACK f5a3a5b9ab, tested on Linux Mint 19.3 by manually opening available dialogs and sub-windows, and applying the `Ctrl+W` shortcut. Also tested with "Minimize on close" option enabled / disabled.

Tree-SHA512: 39851f6680cf97c334d5759c6f8597cb45685359417493ff8b0566672edbd32303fa15ac4260ec8ab5ea1458a600a329153014f25609e1db9cf399aa851ae2f9
2020-05-04 11:53:34 +02:00
practicalswift b56607a89b Remove CCoinsViewCache::GetValueIn(...) 2020-05-03 18:42:14 +00:00
Vasil Dimov 71f183a49b
build: warn on potentially uninitialized reads
Enable -Wconditional-uninitialized to warn on potentially uninitialized
reads.

Fix the sole such warning in Bitcoin Core in GetRdRand(): r1 would be
set to 0 on rdrand failure, so initializing it to 0 is a non-functional
change.

From "Intel 64 and IA-32 ArchitecturesSoftware Developer's Manual" [1],
page 1711: "CF=1 indicates that the data in the destination is valid.
Otherwise CF=0 and the data in the destination operand will be returned
as zeros for the specified width."

[1] https://software.intel.com/sites/default/files/managed/39/c5/325462-sdm-vol-1-2abcd-3abcd.pdf
2020-05-03 17:21:45 +02:00
MarcoFalke 2e6a16b968
Merge #18855: tests: feature_backwards_compatibility.py test downgrade after upgrade
489ebfd7a1 tests: feature_backwards_compatibility.py test downgrade after upgrade (Andrew Chow)

Pull request description:

  After upgrading the node, try to go back to the original version to make sure that using a newer node version does not prevent the wallet file from being downgraded again.

ACKs for top commit:
  MarcoFalke:
    ACK 489ebfd7a1

Tree-SHA512: 86231de6514b3657912fd9d6621212166fd2b29b591fc97120092c548babcf1d6f50b5bd103b28cecde395a26809134f01c1a198725596c3626420de3fd1f017
2020-05-03 10:35:21 -04:00
MarcoFalke cce034b028
Merge #18839: test: Fix intermittent issues
fab7ee3990 test: Fix p2p_leak intermittent issue (MarcoFalke)
fa8614aea9 test: Fix intermittent p2p_segwit issue (MarcoFalke)

Pull request description:

  Fixes #18801
  Fixes #18802

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

Tree-SHA512: b5d0473ec1133aded127bef4c0c90f6b55906327cb49cbbd0776c4971cd9d5c9375fb70cc3dc8dd1f4bd8b1245c4414e803dc0d29ed4553b00eb131d27c9c128
2020-05-03 10:30:47 -04:00
MarcoFalke ddc0a600b3
Merge #18617: test: add factor option to adjust test timeouts
2742c34286 test: add factor option to adjust test timeouts (Harris)

Pull request description:

  This PR adds a new option **factor** that can be used to adjust timeouts in various functional tests.
  Several timeouts and functions from `authproxy`, `mininode`, `test_node` and `util` have been adapted to use this option. The factor-option definition is located in `test_framework.py`.

  Fixes https://github.com/bitcoin/bitcoin/issues/18266
  Also Fixes https://github.com/bitcoin/bitcoin/issues/18834

ACKs for top commit:
  MarcoFalke:
    Thanks! ACK 2742c34286

Tree-SHA512: 6d8421933ba2ac1b7db00b70cf2bc242d9842c48121c11aadc30b0985c4a174c86a127d6402d0cd73b993559d60d4f747872d21f9510cf4806e008349780d3ef
2020-05-03 08:58:56 -04:00
Andrew Chow 489ebfd7a1 tests: feature_backwards_compatibility.py test downgrade after upgrade
After upgrading the node, try to go back to the original version to make
sure that using a newver node version does not prevent the wallet file
from being downgraded again.
2020-05-02 23:45:17 -04:00
Harris 2742c34286
test: add factor option to adjust test timeouts
Co-authored-by: MarcoFalke <falke.marco@gmail.com>
2020-05-03 01:42:40 +02:00
MarcoFalke fa09110ebb
doc: Fix typo in Coin doxygen comment 2020-05-02 19:30:58 -04:00
fanquake 68ef9523d1
Merge #18413: script: prevent UB when computing abs value for num opcode serialize
2748e87932 script: prevent UB when computing abs value for num opcode serialize (pierrenn)

Pull request description:

  This was reported by practicalswift here #18046

  It seems that the original author of the line used a reference to glibc `abs`: https://github.com/lattera/glibc/blob/master/stdlib/abs.c

  However depending on some implementation details this can be undefined behavior for unusual values.

  A detailed explanation of the UB is provided here : https://stackoverflow.com/questions/17313579/is-there-a-safe-way-to-get-the-unsigned-absolute-value-of-a-signed-integer-with (by [Billy O'Neal](https://twitter.com/malwareminigun))

  Simple relevant godbolt example :  https://godbolt.org/z/yRwtCG

  Thanks!

ACKs for top commit:
  sipa:
    ACK 2748e87932
  MarcoFalke:
    ACK 2748e87932, only checked that the bitcoind binary does not change with clang -O2 🎓
  practicalswift:
    ACK 2748e87932

Tree-SHA512: 539a34c636c2674c66cb6e707d9d0dfdce63f59b5525610ed88da10c9a8d59d81466b111ad63b850660cef3750d732fc7755530c81a2d61f396be0707cd86dec
2020-05-02 21:24:05 +08:00
Andrew Chow b59b4504ab have GenerateNewKey and DeriveNewChildKey take a CHDChain as an argument 2020-05-01 18:46:00 -04:00
Hennadii Stepanov 35f1189ea7
build: Rename BUILD_* macros and the code self-descriptive 2020-05-02 01:00:07 +03:00
Hennadii Stepanov dc1fba9389
scripted-diff: Rename share/genbuild.sh macros to more meaningful ones
-BEGIN VERIFY SCRIPT-
sed -i 's/\bDESC\b/GIT_TAG/' share/genbuild.sh
sed -i 's/\bSUFFIX\b/GIT_COMMIT/g' share/genbuild.sh
-END VERIFY SCRIPT-
2020-05-02 00:59:20 +03:00
MarcoFalke 844d2070a2
Merge #18828: test: Strip down previous releases boilerplate
fa359d14c0 test: Strip down previous releases boilerplate (MarcoFalke)

Pull request description:

  Reduces code bloat and mental load to write compatibility tests

ACKs for top commit:
  Sjors:
    tACK fa359d14c0 on macOS

Tree-SHA512: dc66286b24b2f137e5bca99412850ec7eee8cc61cf9cdc7ab532d529220808189baea8d1b077f8b7f40d3e8881d981e1ffc5a877adb394816f1225b1186253e4
2020-05-01 14:57:59 -04:00
Carl Dong 27e63e01cc
build: Accomodate makensis v2.x
Apparently the -X flag doesn't work as expected in makensis v2.x

For example:

  makensis -V2 share/setup.nsi -X'OutFile "test.exe"'

Will output:

  OutFile expects 1 parameters, got 0.
  Usage: OutFile install_output.exe

So let's instead construct the file using POSIX-compliant commands and
shell constructs
2020-05-01 14:27:57 -04:00
Carl Dong 1f2c39a30e
guix: Remove logical cores requirement
Thanks MarcoFalke for pushing this to its limits and testing :-)
2020-05-01 12:33:47 -04:00
Carl Dong a4f6ffa71e
lint: Also enable source statements for non-gitian 2020-05-01 12:31:07 -04:00