422677963a refactor: replace isPotentialtip/waitForNotifications by higher method (Antoine Riard)
edfe9438ca Add WITH_LOCK macro: run code while locking a mutex (Antoine Riard)
Pull request description:
In Chain interface, instead of a isPotentialTip and a WaitForNotifications method, both used only once in CWallet::BlockUntilSyncedToCurrentChain, combine them in a higher WaitForNotificationsUpToTip method. Semantic should be unchanged, wallet wait for pending notifications to be processed unless block hash points to the current chain tip or a descendant.
ACKs for commit 422677:
jnewbery:
ACK 422677963a
ryanofsky:
utACK 422677963a. Only change is adding the cs_wallet lock annotation.
Tree-SHA512: 2834ff0218795ef607543fae822e5cce25d759c1a9cfcb1f896a4af03071faed5276fbe0966e0c6ed65dc0e88af161899c5b2ca358a2d24fe70969a550000bf2
effe81f750 Move g_is_mempool_loaded into CTxMemPool::m_is_loaded (Ben Woosley)
bb8ae2c419 rpc: Expose g_is_mempool_loaded via getmempoolinfo and /rest/mempool/info.json (Ben Woosley)
Pull request description:
And use it to fix a race condition in mempool_persist.py:
https://travis-ci.org/Empact/bitcoin/jobs/487577243
Since e.g. getrawmempool returns errors based on this status, this
enables users to test it for readiness.
Fixes#12863
ACKs for commit effe81:
MarcoFalke:
utACK effe81f750
jnewbery:
utACK effe81f750
Tree-SHA512: 74328b0c17a97efb8a000d4ee49b9a673c2b6dde7ea30c43a6a2eff961a233351c9471f9a42344412135786c02bdf2ee1b2526651bb8fed68bd94d2120c4ef86
fa90a89eee [test] combine_logs: append node stderr and stdout if it exists (MarcoFalke)
Pull request description:
See issue:
* tests: bitcoind stdout and error should be passed to the logger #13519
ACKs for commit fa90a8:
laanwj:
utACK fa90a89eee
Tree-SHA512: 39c4596e2e133c9011ab01bc4dc24e884d0a8cce7a67d3765f17c288d3ffbd438e1ff6016d0f817a981b27fce17fa77a1ff56787ddb1ea55123ce9ecffb44c08
fa79a783d6 test: Add reorg test to wallet_balance (MarcoFalke)
fad03cd046 test: Check that wallet txs not in the mempool are untrusted (MarcoFalke)
fa195315e6 test: Add getunconfirmedbalance test with conflicts (MarcoFalke)
fa464e8211 test: Add wallet_balance test for watchonly (MarcoFalke)
Pull request description:
Second commit can be reviewed with `--ignore-all-space`
ACKs for commit fa79a7:
jnewbery:
utACK fa79a783d6
Tree-SHA512: ec4919a3c93b6dcb35d58e7c65bdffe7f4c8cb87b9287f3679631c1823ef5bd72789f233def94e60c1ab332711601751645566f5997ce250af55b328ed60e917
151f3e9cf1 Add settings merge test to prevent regresssions (Russell Yanofsky)
Pull request description:
Test-only change. Motivation: I'm trying to clean up settings code and add support for read/write settings without changing existing behavior, but current tests are very scattershot and don't actually cover a lot of current behavior.
ACKs for commit 151f3e:
jonasschnelli:
utACK 151f3e9cf1.
MarcoFalke:
utACK 151f3e9cf1
Tree-SHA512: f9062f078da02855cdbdcae37d0cea5684e82adbe5c701a8eb042ee4a57d899f0ffb6a9db3bcf58b639dff22b2b2d8a75f9a7917402df58904036753d65a1e3e
9f9db39041 QA/mininode: Send all headers upfront in send_blocks_and_test to avoid sending an unconnected one (Luke Dashjr)
Pull request description:
While this doesn't currently trigger any problems, the network protocol does expect headers to be sent connectable in normal circumstances, and if too many are sent out of order will disconnect the peer.
ACKs for commit 9f9db3:
Tree-SHA512: 25b88718e4ba3d31aed2de7ece23fab9a0737fd6536c5e618ea8eb5a3a217dab0dffaebc4892df7993bcea7efb7c4fb5085fabebe99535b8f7fdde3c19df54ff
This work is prerequisite to attaching thread names to log lines and deadlock
debug utilities. This code allows setting of an "internal" threadname per
thread on platforms where thread_local is available.
This commit also moves RenameThread() out of a more general module and adds a
numeric suffix to disambiguate between threads with the same name. It
explicitly names a few main threads using the new util::ThreadRename().
fac174e2d1 lint: Check that all wallet args are hidden (MarcoFalke)
Pull request description:
Can be tested by calling `git revert 765d5890be` and then running the script
ACKs for commit fac174:
fanquake:
utACK fac174e
practicalswift:
tACK fac174e2d1
Tree-SHA512: f7d40dc3d9f471c0cf77bc2746c1ef09b9df093b24508e72bfc50114c338e5dcb4a17741cf97566aeddc6d608f13e4eb1c986ae9935cebad1d589495ac16e0b2
5d7ce74ab3 add missing debian contrib files to tarball (Peter Wagner)
Pull request description:
the current release is missing the debian contrib folder, add it
ACKs for commit 5d7ce7:
Tree-SHA512: 9d38c9ec0cc13171582c0bde57a2f69b22026a91f353e20da556cb63a4cfbba68b2465c9c62eaa98df50a65d971cc4411ffee519824b34068772ae8ddedb7d4c
765d5890be Bugfix: dummywallet: Add -ignorepartialspends to list of ignored wallet options (Luke Dashjr)
0f09eb779d dummywallet: Reformat ignored wallet options list (Luke Dashjr)
Pull request description:
When building w/o wallet support, we add all the wallet options as hidden options to avoid throwing errors/warnings that they're unknown.
`-ignorepartialspends` is missing from this list. This PR adds it.
(This seems like a good candidate for a linter? Or maybe we can autogenerate it?)
Also reformats the dummywallet options list across multiple lines to make conflicts less often.
ACKs for commit 765d58:
meshcollider:
utACK 765d5890be
MarcoFalke:
utACK 765d5890be
promag:
utACK 765d589.
practicalswift:
utACK 765d5890be
fanquake:
utACK 765d589
Tree-SHA512: 37c8037148bdc1b7a8bde201eff51ee6a64c042c17eb8b6c68faef490d16575348c2f22ab81f48302b8ad80a5559222af23b721a8b5acc1d89c0757fb88796a6
70c1cf8c1c wallet: Avoid logging no_such_file_or_directory error (João Barbosa)
Pull request description:
Avoid logging `IsBerkeleyBtree: No such file or directory ...`. The result of `IsBerkeleyBtree` is the same since `fs::file_size()` returns 0 for non existent files.
Fix#15912.
ACKs for commit 70c1cf:
practicalswift:
utACK 70c1cf8c1c
jonasschnelli:
utACK 70c1cf8c1c
Empact:
utACK 70c1cf8c1c
Tree-SHA512: 964a64fff9a17b805a1570884cdb2beb82283498f790b0464e011791803ae7f37dba213320c76a920dd92b2b972a7640e6277ecf470400734149dc8f9f9f1d6d
1b602f6fe remove extraneous scope (andrewtoth)
6ad372a97 wallet: log on rescan completion (andrewtoth)
Pull request description:
Currently there is nothing logged when a rescan completes successfully. This leaves the last log message something like:
```
Still rescanning. At block 573037. Progress=0.998415
```
It is unclear when the rescan actually finished. This adds a `Rescan completed.` message to make it more clear.
ACKs for commit 1b602f:
Empact:
utACK 1b602f6fed
meshcollider:
utACK 1b602f6fed
Tree-SHA512: 618d646a0f143c2372f1db91c14e7f677b39fb3a2957e887cbc349971c3e8953bc017e2028ac489368c20dbb9a7265c4c2d448c95de785366acfe0e576f1be66
5c759c73b2 [wallet] Move maxTxFee to wallet (John Newbery)
Pull request description:
Closes#15355
Moves the `-maxtxfee` from the node to the wallet. See discussion in issue for details.
This is a cleanup. There is no change in behaviour.
Completes #15620
ACKs for commit 5c759c:
MarcoFalke:
utACK 5c759c73b2
ryanofsky:
utACK 5c759c73b2. Changes since last review: updated commit message and an error message and method name.
meshcollider:
utACK 5c759c73b2
Tree-SHA512: 2f9b2729da3940a5cda994d3f3bc11ee1a52fcc1c5e9842ea0ea63e4eb0300e8416853046776311298bc449ba07554aa46f0f245ce28598a5b0bd7347c12e752
c634b1e20 [POLICY] Make sending to future native witness outputs standard (Pieter Wuille)
Pull request description:
As discussed in the April 18 2019 IRC meeting.
This makes sending to future Segwit versions via native outputs (bech32) standard for relay, mempool acceptance, and mining. The reasons are:
* This may interfere with smooth adoption of future segwit versions, if they're defined (by the sender wallet/node).
* It violates BIP173 ("Version 0 witness addresses are always 42 or 62 characters, but implementations MUST allow the use of any version."), though admittedly this code was written before BIP173.
* It doesn't protect much, as P2SH-embedded segwit cannot be filtered in this way.
* As a general policy, the sender shouldn't care what the receiver likes his outputs to be.
Note that _spending_ such outputs (including P2SH-embedded ones) remains nonstandard, as that is actually required for softfork safety.
ACKs for commit c634b1:
MarcoFalke:
utACK c634b1e207
harding:
Tested ACK c634b1e207
meshcollider:
utACK c634b1e207
Tree-SHA512: e37168a1be9f445a04d4280593f0a92bdae33eee00ecd803d5eb16acb5c9cfc0f1f0a1dfbd5a0cc73da2c9928ec11cbdac7911513a78f85b789ae0d00e1b5962
99e88a372 rpc: Remove dependency on interfaces::Chain in SignTransaction (Antoine Riard)
Pull request description:
Assuming wallet RPCs and node RPCs will go into different processes, signrawtransactionwithkey doesn't need to access Coins via interfaces::Chain, it may use directly utility in node/coins.cpp
Obviously will need rebase after #15638
Tree-SHA512: 42ee8fcbcd38643bbd82210db6f68249bed5ee036a4c930a1db534d0469a133e287b8869c977bf0cc79a7296dde04f72adb74d24e1cd20f4a280f4c2b7fceb74
201393f932 Align code example with clang-format (Hennadii Stepanov)
Pull request description:
With this PR running [clang-format-diff.py](https://github.com/bitcoin/bitcoin/blob/master/contrib/devtools/clang-format-diff.py) on the code example will not fire a format adjustment.
ACKs for commit 201393:
MarcoFalke:
trivial ACK 201393f932
Tree-SHA512: 825c5e8cfba1bc140c2dfc38b82c5eec268b82b528af4301f25dfacc1f4f0788e268e72e8512f7ce001be665a8b07964a0af832fd9a1c6bd1c27d252f93619bc
faebd8ca11 appveyor: Write @PACKAGE_NAME@ to config (MarcoFalke)
Pull request description:
fix tests which are currently failing on appveyor after #15896
ACKs for commit faebd8:
Sjors:
utACK faebd8c if AppVeyor blesses it.
ryanofsky:
utACK faebd8ca11. Not following your own "Please provide clear motivation for your patch" advice maybe, but I gather the motivation is to fix tests which are currently failing on appveyor after #15896?
Tree-SHA512: 645cc9f82a4897659bfd41d0c645e21201c43bceb36a073e7fa9fff6d38e8190e7b23e44f77f18ecf3cd1794a9a11b8cabfb33d1a477e7417d839f9451b8253d