Commit graph

24317 commits

Author SHA1 Message Date
Pieter Wuille
65c589e45e Convert Qt to new serialization 2020-05-20 10:16:41 -07:00
Carl Dong
f852761aec
guix: Add clarifying documentation for V env var 2020-05-20 13:11:16 -04:00
MarcoFalke
fa8bbb1368
net: Use C++11 member initialization in protocol 2020-05-20 08:27:07 -04:00
MarcoFalke
448bdff263
Merge #18317: Serialization improvements step 6 (all except wallet/gui)
f9ee0f37c2 Add comments to CustomUintFormatter (Pieter Wuille)
4eb5643e35 Convert everything except wallet/qt to new serialization (Pieter Wuille)
2b1f85e8c5 Convert blockencodings_tests to new serialization (Pieter Wuille)
73747afbbe Convert merkleblock to new serialization (Pieter Wuille)
d06fedd1bc Add SER_READ and SER_WRITE for read/write-dependent statements (Russell Yanofsky)
6f9a1e5ad0 Extend CustomUintFormatter to support enums (Russell Yanofsky)
769ee5fa00 Merge BigEndian functionality into CustomUintFormatter (Pieter Wuille)

Pull request description:

  The next step of changes from #10785.

  This:
  * Adds support for enum serialization to `CustomUintFormatter`, used in `CAddress` for service flags.
  * Merges `BigEndian` into `CustomUintFormatter`, used in `CNetAddr` for port numbers.
  * Converts everything (except wallet and gui) to use the new serialization framework.

ACKs for top commit:
  MarcoFalke:
    re-ACK f9ee0f37c2, only change is new documentation commit for CustomUintFormatter 📂
  ryanofsky:
    Code review ACK f9ee0f37c2. Just new commit adding comment since last review
  jonatack:
    Code review re-ACK f9ee0f37c2 only change since last review is an additional commit adding Doxygen documentation for `CustomUintFormatter`.

Tree-SHA512: e7a0a36afae592d5a4ff8c81ae04d858ac409388e361f2bc197d9a78abca45134218497ab2dfd6d031e0cce0ca586cf857077b7c6ce17fccf67e2d367c1b6cd4
2020-05-20 07:30:29 -04:00
MarcoFalke
e20e964cb1
Merge #18996: net: Remove un-actionable TODO
fabea6d404 net: Run clang-format on protocol.h (MarcoFalke)
facdeea2b2 net: Remove un-actionable TODO (MarcoFalke)

Pull request description:

  The first commit removes a TODO that is infeasible to solve. Currently, most (de)serializable classes in Bitcoin Core have public members. For example `CMessageHeader`, `FlatFilePos`, `CBlock`, `CTransaction`, `CCoin`, ...

  So either this TODO comment should apply to all classes or to none. Fix that discrepancy by removing it from the source code for now. If deemed important, the TODO can be discussed in a brainstorming issue later.

  Also run clang format on the header file in a new commit. Happy to drop this commit if it is too controversial, but I think it is trivial to review and makes the workflow of developers using clang-format-diff easier.

ACKs for top commit:
  practicalswift:
    ACK fabea6d404
  naumenkogs:
    ACK fabea6d. Not sure why that TODO was there in the first place, but Marco's justification seems correct.
  hebasto:
    ACK fabea6d404, agree with both changes: removing TODO and applying the `clang-format-diff.py`.

Tree-SHA512: b79ae07be27e5a40fc9f411a5e9ae91aecb2fdedbcbf74699614a1004f4ef816bf396903ec6c06eb1395fd83a2047620c7583acbaadfb8c4e613319a63062c3c
2020-05-20 07:27:53 -04:00
MarcoFalke
bd5ec7c528
Merge #19006: rpc: Avoid crash when g_thread_http was never started
faf45d1f1f http: Avoid crash when g_thread_http was never started (MarcoFalke)
fa12a37b27 test: Replace inline-comments with logs, pep8 formatting (MarcoFalke)
fa83b39ff3 init: Remove confusing and redundant InitError (MarcoFalke)

Pull request description:

  Avoid a crash during shutdown when the init sequence failed for some reason

ACKs for top commit:
  promag:
    Tested ACK faf45d1f1f.
  ryanofsky:
    Code review ACK faf45d1f1f. Thanks for updates, this is much easier to parse for me now. Since previous reviews: split out and reverted some cleanups & replaced chmod with mkdir in test
  hebasto:
    ACK faf45d1f1f, tested on Linux Mint 19.3 with the following patch:

Tree-SHA512: 59632bf01c999e65c724e2728ac103250ccd8b0b16fac19d3a2a82639ab73e4f2efb86c78e63c588a5954625d8d0cf9545e2a7e070e6e15d2a54beeb50e00b61
2020-05-20 07:25:04 -04:00
Jonas Schnelli
a587f85853
Merge #18587: gui: Avoid wallet tryGetBalances calls in WalletModel::pollBalanceChanged
d3a56be77a Revert "gui: Avoid Wallet::GetBalance in WalletModel::pollBalanceChanged" (Russell Yanofsky)
bf0a510981 gui: Avoid wallet tryGetBalances calls before TransactionChanged or BlockTip notifications (Russell Yanofsky)
2bc9b92ed8 Cancel wallet balance timer when shutdown requested (Russell Yanofsky)
83f69fab3a Switch transaction table to use wallet height not node height (Russell Yanofsky)

Pull request description:

  Main commit `gui: Avoid wallet tryGetBalances calls` is one-line change to `WalletModel::pollBalanceChanged` that returns early if there hasn't been a new `TransactionChanged` or `BlockTip` notification since the previous poll call. This is the same behavior that was implemented in #18160, now implemented in a simpler way.

  The other commits are a straight revert of #18160, and two tweaks to avoid relying on `WalletModel::m_client_model` lifetime which were causing travis failures with earlier versions of this PR.

  Motivation for this change is to be able to revert #18160 and cut down on unnecessary cross-process calls that happen when #18160 is combined with #10102

  This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10).

ACKs for top commit:
  jonasschnelli:
    utACK d3a56be77a

Tree-SHA512: 3cd31ca515e77c3bd7160d3f1ea0dce5050d4038b2aa441b6f66b8599bd413d81ca5542a197806e773d6092dd1d26830932b1cecbc95298b1f1ab41099e2f12f
2020-05-20 11:09:29 +02:00
fanquake
0aa2ff0f66
Merge #18956: build: enforce minimum required Windows version (7)
e8a8cff07c build: enforce minimum required Windows version (7) (fanquake)

Pull request description:

  Instruct the linker to set the major & minor subsystem versions in the PE
  header to 6 & 1 (NT 6.1 which corresponds to Windows 7). Similar to
  the behaviour on macOS, the binary will now refuse to run on
  unsupported versions of Windows, which, for us, is XP & Vista.

  ![windows_no_run](https://user-images.githubusercontent.com/863730/81654555-38e0fd00-9468-11ea-9cc8-caf37dec5713.png)

ACKs for top commit:
  laanwj:
    ACK e8a8cff07c

Tree-SHA512: 2f7c6443b79b1c6b995e337452aa177e95b0a9c48e47bcf1893aad6fd598e45940ab8eaa5ee1c5d994a521239b4e1b55a55bb3e8ffe367e1349db2a46892a6d4
2020-05-20 10:15:32 +08:00
MarcoFalke
fab908f18a
test: Fix intermittent ETIMEDOUT on FreeBSD 2020-05-19 19:12:41 -04:00
Pieter Wuille
f9ee0f37c2 Add comments to CustomUintFormatter 2020-05-19 14:30:30 -07:00
gzhao408
651f1d816f [test] wait for inital broadcast before comparing mempool entries
- mempool entry 'unbroadcast' field changes when tx passes initial broadcast (receive getdata),
so anytime you compare mempool entries as a whole, you must wait for all broadcasts to complete
('unbroadcast' = False) otherwise the state may change in between calls
- update P2PTxInvStore to send msg_getdata for invs and add functionality to wait for a list
of txids to complete initial broadcast
- make mempool_packages.py wait because it compares entries using getrawmempool and
getmempoolentry
2020-05-19 14:24:27 -07:00
gzhao408
9d3f7eb986 [mempool] sanity check that all unbroadcast txns are in mempool
- before reattempting broadcast for unbroadcast txns, check they are in mempool and remove if not
- this protects from memory leaks and network spam just in case unbroadcast set (incorrectly) has extra txns
- check that tx is in mempool before adding to unbroadcast set to try to prevent this from happening
2020-05-19 14:23:19 -07:00
gzhao408
a7ebe48b94 [rpc] add unbroadcast info to mempool entries and getmempoolinfo
- expose info about number of txns in unbroadcast set and whether a mempool entry's tx has passed initial broadcast
- makes rpcs more informative and allows for more explicit testing, eg tracking if tx is in unbroadcast set
before and after originating node connects to peers (adds this in mempool_unbroadcast.py)
- adds mempool method IsUnbroadcastTx to query for tx inclusion in  mempool's unbroadcast set
2020-05-19 14:23:13 -07:00
MarcoFalke
faf45d1f1f
http: Avoid crash when g_thread_http was never started
g_thread_http can not be joined when it is not joinable. Avoid crashing
the node by adding the required check and add a test.
2020-05-19 10:41:44 -04:00
MarcoFalke
fa12a37b27
test: Replace inline-comments with logs, pep8 formatting 2020-05-19 10:41:30 -04:00
MarcoFalke
fa83b39ff3
init: Remove confusing and redundant InitError
The "A fatal internal error occurred, see debug.log for details" is
redundant because init.cpp will already show an InitError with a better
error message as well as the hint to check the debug.log
2020-05-19 10:37:15 -04:00
MarcoFalke
aa8d76806c
Merge #17946: Fix GBT: Restore "!segwit" and "csv" to "rules" key
412d5fe879 QA: feature_segwit: Check that template "rules" includes "!segwit" as appropriate (Luke Dashjr)
2abe8cc3b7 Bugfix: Include "csv","!segwit" in "rules" (Luke Dashjr)

Pull request description:

  #16060 removed CSV & segwit from versionbits, breaking the "rules" key returned by GBT.

  Without this, miners don't know they're mining segwit blocks, and should fall back to pre-segwit block creation.

ACKs for top commit:
  sipa:
    ACK 412d5fe879
  jnewbery:
    Tested ACK 412d5fe879.

Tree-SHA512: 825d72e257dc0dd4941f2fe498d8d4f4f2a21b9505cd21a8f9eb7fb5d6d7dd9219347928cf90bb57a777920ce24295859763e64fa8a22ebb58fc2380f80f5615
2020-05-19 08:54:23 -04:00
Jonas Schnelli
d44dd51322
Merge #18152: qt: Use SynchronizationState enum for signals to GUI
a0d0f1c6c3 refactor: Remove Node:: queries from GUI (Hennadii Stepanov)
06d519f0b4 qt: Add SynchronizationState enum to signal parameter (Hennadii Stepanov)
3c709aa69d refactor: Remove Node::getReindex() call from GUI (Hennadii Stepanov)
1dab574edf refactor: Pass SynchronizationState enum to GUI (Hennadii Stepanov)
2bec309ad6 refactor: Remove unused bool parameter in RPCNotifyBlockChange() (Hennadii Stepanov)
1df77014d8 refactor: Remove unused bool parameter in BlockNotifyGenesisWait() (Hennadii Stepanov)

Pull request description:

  This PR is a followup of #18121 and:
  - addresses confusion about GUI notification throttling conditions (**luke-jr**'s [comment](https://github.com/bitcoin/bitcoin/pull/18121#discussion_r378552386), **ryanofsky**'s [comment](https://github.com/bitcoin/bitcoin/pull/18121#discussion_r378975960))
  - removes `isInitialBlockDownload()` call from the GUI back to the node (on macOS). See:  **ryanofsky**'s [comment](https://github.com/bitcoin/bitcoin/pull/18121#pullrequestreview-357730284)

ACKs for top commit:
  jonasschnelli:
    Core Review ACK a0d0f1c6c3 (modulo [question](https://github.com/bitcoin/bitcoin/pull/18152#pullrequestreview-414140601)).
  ryanofsky:
    Code review ACK a0d0f1c6c3. Only changes since last review were rebase and tweaking SynchronizationState enum declaration as suggested (thanks!)

Tree-SHA512: b6a712a710666e763aeee0d5440de1391a4c6c8f7fa661888773e1ba59e9e0f83654ee384d4edc704031be7eb25616e5eca2a6e26058d3efb7f64c47f9ed7316
2020-05-19 14:35:02 +02:00
fanquake
e7736854ef
Merge #19008: ci: tsan on clang-9
faf552117e ci: Set DEBIAN_FRONTEND=noninteractive (MarcoFalke)
fa006caa13 ci: tsan on clang-9 (MarcoFalke)

Pull request description:

  Bump the compiler runtime library that includes the sanitizers from clang-8 to clang-9 to get a more recent version. Also, bump the system packages from xenial to bionic to test packages closer to what is commonly used in production.

  The second commit is needed to install the `tzdata` package, which is missing on some operating systems. See https://travis-ci.org/github/MarcoFalke/bitcoin-core/jobs/688455828#L1727

ACKs for top commit:
  hebasto:
    ACK faf552117e
  practicalswift:
    ACK faf552117e -- patch looks correct and Travis is happy

Tree-SHA512: aa38fdae5f716966a83a21d5f7c121675cf7d663148ab3baa065142c8b3850bcd4bf88526d7da0fa51f5e08f2c317b537f950fcc9eb1e69fdacb0eac8863e1c6
2020-05-19 16:10:23 +08:00
fanquake
042ff52142
Merge #18999: log: Remove "No rpcpassword set" from logs
fa243be1dc log: Remove "No rpcpassword set" from logs (MarcoFalke)

Pull request description:

  rpcpassword is deprecated and not recommended anymore. So remove it from the logs, which indicate that an rpcpassword should be set and cause confusion. See #18998.

ACKs for top commit:
  ryanofsky:
    Code review ACK fa243be1dc. New log message makes more sense
  elichai:
    Re Code Review ACK (Checked the diff) fa243be1dc

Tree-SHA512: de3e0800a204b15a59a59a7e6f345013ee9d38e8c5d0c9a94d6142780faa9cce672ed358c7571f53c1eb843bf5afb0b7bcbfd289d3b9e2e0bf8ff2fd361e98a9
2020-05-19 15:41:21 +08:00
fanquake
c73bd004ae
Merge #18861: Do not answer GETDATA for to-be-announced tx
2896c412fa Do not answer GETDATA for to-be-announced tx (Pieter Wuille)
f2f32a3dee Push down use of cs_main into FindTxForGetData (Pieter Wuille)
c6131bf407 Abstract logic to determine whether to answer tx GETDATA (Pieter Wuille)

Pull request description:

  This PR intends to improve transaction-origin privacy.

  In general, we should try to not leak information about what transactions we have (recently) learned about before deciding to announce them to our peers. There is a controlled transaction dissemination process that reveals our transactions to peers that has various safeguards for privacy (it's rate-limited, delayed & batched, deterministically sorted, ...), and ideally there is no way to test which transactions we have before that controlled process reveals them. The handling of the `mempool` BIP35 message has protections in this regard as well, as it would be an obvious way to bypass these protections (handled asynchronously after a delay, also deterministically sorted).

  However, currently, if we receive a GETDATA for a transaction that we have not yet announced to the requester, we will still respond to it if it was announced to *some* other peer already (because it needs to be in `mapRelay`, which only happens on the first announcement). This is a slight privacy leak.

  Thankfully, this seems easy to solve: `setInventontoryTxToSend` keeps track of the txids we have yet to announce to a peer - which almost(*) exactly corresponds to the transactions we know of that we haven't revealed to that peer. By checking whether a txid is in that set before responding to a GETDATA, we can filter these out.

  (*) Locally resubmitted or rebroadcasted transactions may end up in setInventoryTxToSend while the peer already knows we have them, which could result in us incorrectly claiming we don't have such transactions if coincidentally requested right after we schedule reannouncing them, but before they're actually INVed. This is made even harder by the fact that filterInventoryKnown will generally keep known reannouncements out of setInventoryTxToSend unless it overflows (which needs 50000 INVs in either direction before it happens).

  The condition for responding now becomes:

  ```
    (not in setInventoryTxToSend) AND
    (
      (in relay map) OR
      (
        (in mempool) AND
        (old enough that it could have expired from relay map) AND
        (older than our last getmempool response)
      )
    )
  ```

ACKs for top commit:
  naumenkogs:
    utACK 2896c41
  ajtowns:
    ACK 2896c412fa
  amitiuttarwar:
    code review ACK 2896c412fa
  jonatack:
    ACK 2896c412fa per `git diff 2b3f101 2896c41` only change since previous review is moving the recency check up to be verified first in `FindTxForGetData`, as it was originally in 353a391 (good catch), before looking up the transaction in the relay pool.
  jnewbery:
    code review ACK 2896c412fa

Tree-SHA512: e7d5bc006e626f60a2c108a9334f3bbb67205ace04a7450a1e4d4db1d85922a7589e0524500b7b4953762cf70554c4a08eec62c7b38b486cbca3d86321600868
2020-05-19 15:18:06 +08:00
Anthony Towns
a788789948 test/checkqueue_tests: thread safety annotations 2020-05-19 16:33:10 +10:00
Anthony Towns
479c5846f7 rpc/blockchain.cpp: thread safety annotations for latestblock 2020-05-19 16:33:10 +10:00
Anthony Towns
8b5af3d4c1 net: fMsgProcWake use LOCK instead of lock_guard 2020-05-19 16:33:10 +10:00
Anthony Towns
de7c5f41ab wallet/wallet.h: Remove mutexScanning which was only protecting a single atomic bool 2020-05-19 16:33:02 +10:00
MarcoFalke
faf552117e
ci: Set DEBIAN_FRONTEND=noninteractive
Also fix travis environment variables for this build

Previously the resulting env was:

FILE_ENV="./ci/test/00_setup_env_native_tsan.sh" TEST_RUNNER_EXTRA="--exclude feature_block" #= Not= enough= memory= on= travis= machines=
2020-05-18 20:38:56 -04:00
MarcoFalke
fa006caa13
ci: tsan on clang-9 2020-05-18 20:38:54 -04:00
Hennadii Stepanov
a0d0f1c6c3
refactor: Remove Node:: queries from GUI 2020-05-19 03:01:53 +03:00
Hennadii Stepanov
06d519f0b4
qt: Add SynchronizationState enum to signal parameter 2020-05-19 03:01:42 +03:00
MarcoFalke
362f9c60a5
Merge #18986: tests: Add capability to disable RPC timeout in functional tests
38c3dd9c70 docs: Add notes on how to diasble rpc timeout in functional tests while attatching gdb. (codeShark149)
784ae09625 test: Add capability to disable RPC timeout in functional tests. (codeShark149)

Pull request description:

  Many times, especially while debugging RPC callbacks to core using gdb, the test timeout kicks in before the response can get back. This can be annoying and requires restarting the functional test as well as gdb attachment.

  This PR adds a `--notimeout` flag into `test_framework` and sets the `rpc_timeout` accordingly if the flag is set.

  The same effect can be achieved with newly added `--factor` flag but keeping a separate flag that explicitly disables the timeout can be easier for new testers to find it out and separates its purpose from the `--factor` flag.

  Requesting review ryanofsky jnewbery as per the IRC discussion.

  Update: After initial round of review, the approach is modified to accommodate the functionality in already existing `--factor` flag. `--factor` is changed to `--timeout-factor` to express its intent better.

ACKs for top commit:
  MarcoFalke:
    ACK 38c3dd9c70 and thanks for fixing up all my typos 😅
  jnewbery:
    ACK 38c3dd9c70.

Tree-SHA512: 9458dd1010288c62f8bb83f7a4893284fbbf938882dd65fc9e08810a910db07ef676e3100266028e5d4c8ce407b2267b3860595015da070c84a9d4a9816797db
2020-05-18 20:01:13 -04:00
Hennadii Stepanov
3c709aa69d
refactor: Remove Node::getReindex() call from GUI 2020-05-19 02:49:48 +03:00
Hennadii Stepanov
1dab574edf
refactor: Pass SynchronizationState enum to GUI
Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
2020-05-19 02:49:32 +03:00
Hennadii Stepanov
2bec309ad6
refactor: Remove unused bool parameter in RPCNotifyBlockChange() 2020-05-19 02:39:45 +03:00
Hennadii Stepanov
1df77014d8
refactor: Remove unused bool parameter in BlockNotifyGenesisWait() 2020-05-19 02:39:33 +03:00
Hennadii Stepanov
26c093a995
Replace thread_local g_lockstack with a mutex-protected map
This change prevents UB in case of early g_lockstack destroying.

Co-authored-by: Wladimir J. van der Laan <laanwj@protonmail.com>
2020-05-19 01:14:08 +03:00
Hennadii Stepanov
58e6881bc5
refactor: Refactor duplicated code into LockHeld() 2020-05-19 01:14:07 +03:00
Hennadii Stepanov
f511f61dda
refactor: Add LockPair type alias 2020-05-19 01:14:07 +03:00
Hennadii Stepanov
8d8921abd3
refactor: Add LockStackItem type alias 2020-05-19 01:14:07 +03:00
Hennadii Stepanov
458992b06d
Prevent UB in DeleteLock() function 2020-05-19 01:13:49 +03:00
John Newbery
0187d4c118 [indexes] Add compact block filter headers cache
Cache block filter headers at heights of multiples of 1000 in memory.

Block filter headers at height 1000x are checkpointed, and will be the
most frequently requested. Cache them in memory to avoid costly disk
reads.
2020-05-18 12:54:07 -04:00
codeShark149
38c3dd9c70 docs: Add notes on how to diasble rpc timeout in functional tests while attatching gdb. 2020-05-18 21:18:40 +05:30
codeShark149
784ae09625 test: Add capability to disable RPC timeout in functional tests.
Modifies the existing --factor flag to --timeout-factor to better express intent.
Adds rules to disable timeout if --timeout-factor is set to 0.
Modfies --timeout-factor help doc to inform users about this feature.
2020-05-18 21:18:04 +05:30
gzhao408
d160069604 [wallet] remove nLastResend logic
remove nLastResend because it's unnecessary now that rebroadcasts always happen at least 12 hours later
2020-05-17 17:52:11 -07:00
MarcoFalke
fa243be1dc
log: Remove "No rpcpassword set" from logs 2020-05-17 12:39:26 -04:00
glowang
0ea5d70b47 Updated comment for the condition where a transaction relay is denied 2020-05-17 08:33:09 -07:00
MarcoFalke
4444dbf4d5
gui: Remove un-actionable TODO 2020-05-17 10:52:31 -04:00
MarcoFalke
fabea6d404
net: Run clang-format on protocol.h
Can be reviewed with the git diff flags
-U0 --ignore-all-space --word-diff-regex=.
2020-05-17 10:26:19 -04:00
MarcoFalke
facdeea2b2
net: Remove un-actionable TODO 2020-05-17 10:24:16 -04:00
MarcoFalke
dc5333d31f
Merge #18938: tests: Fill fuzzing coverage gaps for functions in consensus/validation.h, primitives/block.h and util/translation.h
cd34038cbd Switch from Optional<T> to std::optional<T> (C++17). Run clang-format. (practicalswift)
fb559c1170 tests: Fill fuzzing coverage gaps for functions in util/translation.h (practicalswift)
b74f3d6c45 tests: Fill fuzzing coverage gaps for functions in consensus/validation.h (practicalswift)
c0bbf8193d tests: Fill fuzzing coverage gaps for functions in primitives/block.h (practicalswift)

Pull request description:

  * Fill fuzzing coverage gaps for functions in `consensus/validation.h`
  * Fill fuzzing coverage gaps for functions in `primitives/block.h`
  * Fill fuzzing coverage gaps for functions in `util/translation.h`
  * Switch from `Optional<T>` to `std::optional<T>` (C++17). Run `clang-format`.

  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 :)

Top commit has no ACKs.

Tree-SHA512: d6aa4634c3953ade173589a8239bd230eb317ef897835a8557acb73df01b25e5e17bf46f837838e59ec04c1f3d3b7d1309ba68c8a264d17b938215512c9e6085
2020-05-17 08:19:39 -04:00
MarcoFalke
f8123d483c
Merge #18952: test: avoid os-dependant path
8a22fd0114 avoided os-dependant path (Ferdinando M. Ametrano)

Pull request description:

  The current code fails on windows because of the forward slashes; using os.path.join solves the problem and it is in general more robust

ACKs for top commit:
  MarcoFalke:
    ACK 8a22fd0114

Tree-SHA512: 813f27aea33f97c8afac52e716a55fc5d7fb69621023aba99d40df7e1d145e0ec8d1eee49ddd403b219bf0e0e168e0e987b05c78eaef611f744d99bf2fc8bc91
2020-05-16 06:16:47 -04:00