Commit graph

14298 commits

Author SHA1 Message Date
Brannon King
1aab6cd3b8 separate claim from children storage 2020-03-26 15:40:14 +02:00
Brannon King
c6fd2280aa optimized a little 2020-03-26 15:40:14 +02:00
Brannon King
e510a81fec first pass at not loading full claimtrie into RAM
tweaks
2020-03-26 15:40:14 +02:00
lbrynaut
2a78c776b4 Detect "claim" type transactions.
Add code to enable a hardfork into witness support, in addition to
possible BIP9 fiddling.
Fix a bug in abandonclaim and abandonsupport that burns coins on
abandon, rather than sending to the intended destination.
2020-03-26 15:40:14 +02:00
Brannon King
a01614f5f5 updated to support using bech32 addresses with claim ops 2020-03-26 15:40:14 +02:00
Brannon King
ff0f8d8059 fix unit test crash on OSX
pulled in some fixes from v18
2020-03-26 15:40:14 +02:00
Brannon King
2df70eeed1 removed superfluous fRequireTakeoverHeights 2020-03-26 15:40:14 +02:00
Brannon King
5375f90a88 made a new "claims" logging category (off by default) 2020-03-26 15:40:14 +02:00
Brannon King
a853cf5c7b renamed some of the cache fields 2020-03-26 15:40:14 +02:00
Anthony Fieroni
27b39ba67a Better use copies on iterate claim and support re-add
Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
2020-03-26 15:40:14 +02:00
Anthony Fieroni
8af7ed9450 A bit more cleanup
Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
2020-03-26 15:40:14 +02:00
Anthony Fieroni
c83062bfa8 Code refactor
Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
2020-03-26 15:40:14 +02:00
Brannon King
6423377fe1 revert regtest expiration change 2020-03-26 15:40:14 +02:00
Anthony Fieroni
3f97b2c70a Fix consensus
Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
2020-03-26 15:40:14 +02:00
Anthony Fieroni
934908c79e Fix expiration fork usage
Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
2020-03-26 15:40:14 +02:00
Brannon King
55da76a515 stop overwriting releases when tags are rebased
and stop putting timestamps in the zips


reverted csv, segwit numbers


apparently the overwrite is necessary


going to do releases manually
2020-03-26 15:40:14 +02:00
Brannon King
f47680424d fix crash on cli help
fix bech32 prefix


bumped version


improve trie read RAM use, fix a few compiler warnings


open segwit window until Jan 2020


work around Windows ICU build issue


upped the soft fork thresh length to a week


open testnet soft forks window


clarifying segwit to be manually enabled


same for testnet
2020-03-26 15:40:14 +02:00
Brannon King
fa8bdefa9e eliminated fuzzer test on osx 2020-03-26 15:39:51 +02:00
Brannon King
24b5d5bbbd changed unit test to deterministic rand 2020-03-26 15:39:51 +02:00
Brannon King
aeb7e2798e post-merge fixes 2020-03-26 15:39:51 +02:00
lbrynaut
c58b8b5aeb Add a test for locktime transactions. 2020-03-26 15:39:51 +02:00
Brannon King
5f1c22680e flattening prefix trie work
put getclaimsintrie back as deprecated


added test for adding a lot of data to the claimtrie


updated unit test to dodge expiration fork
2020-03-26 15:39:51 +02:00
Brannon King
6824576189 added a test for putting a lot of data into the claimtrie
updated to dodge expiration fork
2020-03-26 15:39:51 +02:00
Brannon King
950f1c6575 support coinbasetxn capability in getblocktemplate 2020-03-26 15:39:51 +02:00
Brannon King
41826acac7 upped the default validation period 2020-03-26 15:39:51 +02:00
Brannon King
fba1acd3d7 restored the current "depends" and friends
fix windows test run


unit test round 2


attempting to fix ccache use on darwin


made ccache optional, no longer pulls clang on darwin build


fixing darwin build from Dockerfile


fixed missing nproc on OSX


updated readme to include regtest example, build examples


fix QT unit tests


made -j get passed down, added build.sh
2020-03-26 15:39:51 +02:00
Brannon King
2d38d8af16 fixed ancestors not all in claim trie on packageFees condition 2020-03-26 15:39:51 +02:00
Brannon King
acaede4327 made cache match legacy_master, removed my bad assert in undo 2020-03-26 15:39:51 +02:00
Brannon King
5cf649e90c added claimtrie field back to getblocktemplate
I also included a test to ensure that we don't forget it next time
2020-03-26 15:39:51 +02:00
Brannon King
d3f29be779 Undo compatibility (#281)
* added test for claimname RPC
2020-03-26 15:39:51 +02:00
lbrynaut
3340fcb85a Fix a bug that treats all claims as our own wallet txs. 2020-03-26 15:39:51 +02:00
Brannon King
0c130f40c7 allow rest/block/height.json
changes from review, added integration test
2020-03-26 15:39:51 +02:00
Brannon King
71acdb839c code reuse between miner & validator
originally from BvbFan
2020-03-26 15:39:51 +02:00
Brannon King
e7d7d0861b pulled in a few minor keepers from the other rebase branch 2020-03-26 15:39:51 +02:00
Brannon King
9ad7b0c90f fixed small claim names coming out as numeric 2020-03-26 15:39:51 +02:00
Brannon King
9c866832de fixed slow-running unit tests 2020-03-26 15:39:51 +02:00
lbrynaut
9295adeb38 Rebase lbry on to Bitcoin 0.17.
This contains significant rebase / merge / testing work by Naut
<lbrynaut@protonmail.com>, Anthony Fieroni <bvbfan@abv.bg> and Brannon
King <countprimes@gmail.com>.
2020-03-26 15:39:51 +02:00
Pierre Rochard
e3ba14387d Tests: add unit tests for GetWalletEnv
Github-Pull: #11911
Rebased-From: 88b1d95
2020-03-26 15:39:51 +02:00
Russell Yanofsky
02c080af5e Free BerkeleyEnvironment instances when not in use
Instead of adding BerkeleyEnvironment objects permanently to the g_dbenvs map,
use reference counted shared pointers and remove map entries when the last
BerkeleyEnvironment reference goes out of scope.

This change was requested by Matt Corallo <git@bluematt.me> and makes code that
sets up mock databases cleaner. The mock database environment will now go out
of scope and be reset on destruction so there is no need to call
BerkeleyEnvironment::Reset() during wallet construction to clear out prior
state.

This change does affect bitcoin behavior slightly. On startup, instead of same
wallet environments staying open throughout VerifyWallets() and OpenWallets()
calls, VerifyWallets() will open and close an environment once for each wallet,
and OpenWallets() will create its own environment(s) later.

Github-Pull: #11911
Rebased-From: f1f4bb7
2020-03-26 15:39:51 +02:00
Chun Kuan Lee
5847e62f19 wallet: Add trailing wallet.dat when detecting duplicate wallet if it's a directory.
Github-Pull: #14552
Rebased-From: 15c93f0
2020-03-26 15:39:51 +02:00
João Barbosa
3cf3002e9e wallet: Refactor to use WalletLocation
Github-Pull: #14350
Rebased-From: 65f3672
2020-03-26 15:39:51 +02:00
João Barbosa
595f5c3ca3 wallet: Add WalletLocation utility class
Github-Pull: #14350
Rebased-From: 01a4c09
2020-03-26 15:39:50 +02:00
Andrew Chow
cafa1709b6 Add function to close all Db's and reload the databae environment
Adds a ReloadDbEnv function to BerkeleyEnvironment in order to close all Db
instances, closes the environment, resets it, and then reopens
the BerkeleyEnvironment.

Also adds a ReloadDbEnv function to BerkeleyDatabase that calls
BerkeleyEnvironment's ReloadDbEnv.

Github-Pull: #12493
Rebased-From: 5d296ac
2020-03-26 15:39:50 +02:00
João Barbosa
b42ce5c0de rpc: Make unloadwallet wait for complete wallet unload
Github-Pull: #14941
Rebased-From: c37851d
2020-03-26 15:39:50 +02:00
João Barbosa
bcb88335ab qt: Add GUIUtil::bringToFront
Github-Pull: #14123
Rebased-From: 5796671e1d
2020-03-26 15:39:50 +02:00
Hennadii Stepanov
cce339ea42 Use Qt signal for macOS Dock icon click event
This moves the Dock icon click reaction code to the common place and
allows some cleanup in obj_c code.

According to the Apple's docs `class_replaceMethod` behaves as
`class_addMethod`, if the method identified by name does not yet exist;
or as `method_setImplementation`, if it does exist.

Github-Pull: #14597
Rebased-From: 2464925e7b
2020-03-26 15:39:50 +02:00
MarcoFalke
659dcb6c59 rpc: Avoid creating non-standard raw transactions
Github-Pull: #14890
Rebased-From: fa4c8679ed
2020-03-26 15:39:50 +02:00
Glenn Willen
2ff659ac91 Refactor PSBTInput signing to enforce invariant
Refactor the process of PSBTInput signing to enforce the invariant that
a PSBTInput always has _either_ a witness_utxo or a non_witness_utxo,
never both.

This simplifies the logic of SignPSBTInput slightly, since it no longer
has to deal with the "both" case. When calling it, we now give it, in
order of preference: (1) whichever of the utxo fields was already
present in the PSBT we received, or (2) if neither, the
non_witness_utxo field, which is just a copy of the input transaction,
which we get from the wallet.

SignPSBTInput no longer has to remove one of the two fields; instead, it
will check if we have a witness signature, and if so, it will replace
the non_witness_utxo with the witness_utxo (which is smaller, as it is
just a copy of the output being spent.)

Add PSBTInput::IsSane checks in two more places, which checks for
both utxo fields being present; we will now give an RPC error early on
if we are supplied such a malformed PSBT to fill in.

Also add a check to FillPSBT, to avoid touching any input that is
already signed. (This is now redundant, since we should no longer
potentially harm an already-signed input, but it's harmless.)

fixes #14473

Github-Pull: #14588
2020-03-26 15:39:50 +02:00
Glenn Willen
248e1132b2 Simplify arguments to SignPSBTInput
Remove redundant arguments to SignPSBTInput -- since it needs several
bits of the PartiallySignedTransaction, pass in a reference instead of
doing it piecemeal. This saves us having to pass in both a PSBTInput and
its index, as well as having to pass in the CTransaction. Also avoid
redundantly passing the sighash_type, which is contained in the
PSBTInput already.

Github-Pull: #14588
Rebased-From: 0f5bda2bd9
2020-03-26 15:39:50 +02:00
Glenn Willen
eaadea01f3 Add bool PSBTInputSigned
Refactor out a "PSBTInputSigned" function to check if a PSBT is signed,
for use in subsequent commits.

Also improve a related comment.

GitHub-Pull: #14588
Rebased-From: 53e6fffb8f
2020-03-26 15:39:50 +02:00
Glenn Willen
cca21e18ea Remove redundant txConst parameter to FillPSBT
Github-Pull: #14588
Rebased-From: 4f3f5cb4b1
2020-03-26 15:39:50 +02:00
Andrew Chow
b7e58f9c1d Convert non-witness UTXOs to witness if witness sig created
If a witness signature was created when a non-witness UTXO is used,
convert the non-witness UTXO to a witness one.
2020-03-26 15:39:50 +02:00
Gregory Sanders
d2611e9d97 CreateTransaction: Assume minimum p2sh-p2wpkh spend size for unknown change 2020-03-26 15:39:50 +02:00
Russell Yanofsky
c33bab30d2 [wallet] Restore ability to list incoming transactions by label
Backport of PR 14411 to v0.17.

This change partially reverts #13075 and #14023.

Fixes #14382
2020-03-26 15:39:50 +02:00
Wladimir J. van der Laan
e275004f72 qt: Pre-rc1 translations update
Tree-SHA512: 11d0d6a23f47e428661b33fa175aa97cc6841452c0c55845fdb0a903a0b147cd6df65e8fdab8b98823bf411018d5d85006af8c2cf14597286e9e284764d15041
2020-03-26 15:39:50 +02:00
Russell Yanofsky
48fef5ebae
gui: Fix race in WalletModel::pollBalanceChanged
Poll function was wrongly setting cached height to the current chain height
instead of the chain height at the time of polling.

This bug could cause balances to appear out of date, and was first introduced
a0704a8996 (r378452145)
Before that commit, there wasn't a problem because cs_main was held during the
poll update.

Currently, the problem should be rare. But if
8937d99ce81a27ae5e1012a28323c0e26d89c50b from #17954 were merged, the problem
would get worse, because the wrong cachedNumBlocks value would be set if the
wallet was polled in the interval between a block being connected and it
processing the BlockConnected notification.

MarcoFalke <falke.marco@gmail.com> also points out that a0704a8996 could lead
to GUI hangs as well, because previously the pollBalanceChanged method, which
runs on the GUI thread, would only make a nonblocking TRY_LOCK(cs_main) call,
but after could make blocking LOCK(cs_main) calls, potentially locking up the
GUI.

Thanks to John Newbery <john@johnnewbery.com> for finding this bug this while
reviewing https://github.com/bitcoin/bitcoin/pull/17954.

Github-Pull: #18123
Rebased-From: bf36a3ccc212ad4d7c5cb8f26d7a22e279fe3cec
2020-02-28 12:07:39 +08:00
Wladimir J. van der Laan
e5322d6dad
qt: Pre-rc2 translations update
Tree-SHA512: 18182903fed7034dc16c2d74ebccf992dd5343376d0f02bebaa50be4ff8fd76c9dd59a95524aef326b74b75a921c819063f06ef45fb9980ae87aacbfb7190554
2020-02-10 15:25:40 +01:00
Wladimir J. van der Laan
ba0b7e1296
Merge #18079: [0.19] psbt: check that various indexes and amounts are within bounds
f5fb7fca96 psbt: check output index is within bounds before accessing (Andrew Chow)
1cf77a2dc3 Don't calculate tx fees for PSBTs with invalid money values (Andrew Chow)

Pull request description:

  Backport of #17156, non-trivial due to crossing the refactor in #17371

ACKs for top commit:
  laanwj:
    ACK f5fb7fca96

Tree-SHA512: 7aabf9a6b8a8e287a26dfbf73a437a3bc55177bef8fc5149d822ef81b8ef2458e1d718c3a19c73532c5cef0f9bd8144574c7fad90ca89f13a08b44edf3a2656d
2020-02-10 13:55:41 +01:00
Wladimir J. van der Laan
4755037d45
Merge #18083: [0.19] wallet: Reset reused transactions cache
f11872cbf4 wallet: Reset reused transactions cache (Fabian Jahr)

Pull request description:

  Backport of #17843

  Required porting to pre-`WalletBatch`

ACKs for top commit:
  kallewoof:
    Code review ACK f11872cbf4
  laanwj:
    code review ACK f11872cbf4
  meshcollider:
    utACK f11872cbf4

Tree-SHA512: 5cf5f136d1eafb0783c2e6799e3675ebc50997ebb56b379d8a198ac35eb3b32f6b98656760a8b1c821eeac665eb80efb1723dd4e9eb58d2b4d45c4674499bedf
2020-02-10 13:04:13 +01:00
MarcoFalke
fa4d00b569
Update univalue subtree 2020-02-09 07:50:08 -08:00
Andrew Chow
f5fb7fca96 psbt: check output index is within bounds before accessing
Github-Pull: #17156
Rebased-From: deaa6dd144f5650b385658a0c4f9a014aff8dde2
2020-02-06 23:22:30 +00:00
João Barbosa
b4e5363ccc gui: Fix unintialized WalletView::progressDialog
Github-Pull: #18062
Rebased-From: acf8abc7f3cf7efa418a46f9f69f23f1a5035582
2020-02-06 09:14:08 +00:00
Fabian Jahr
f11872cbf4 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.

Github-Pull: #17843
Rebased-From: 6fc554f591d8ea1681b8bb25aa12da8d4f023f66
2020-02-06 05:17:18 +00:00
Andrew Chow
1cf77a2dc3 Don't calculate tx fees for PSBTs with invalid money values
In decodepsbt if an invalid amount is seen, don't calculate the fee
but still show the invalid value in the decode.

In analyze psbt, if an invalid amount is seen, set the next step to
be the creator as the creator needs to remake the transaction so that
it is valid.

Github-Pull: #17156
Rebased-From: f1ef7f0aa46338f4cd8de79696027a1bf868f359
2020-02-05 22:55:25 +00:00
Wladimir J. van der Laan
178a834687
Merge #17988: [0.19] Final backports for 0.19.1
daf2fff236 test: add missing #include to fix compiler errors (Karl-Johan Alm)
c8ad23c529 bug-fix macos: give free bytes to F_PREALLOCATE (Karl-Johan Alm)

Pull request description:

  We're about ready to do a [0.19.1 release](https://github.com/bitcoin/bitcoin/milestone/44); so I've opened this to collect the last remaining backports.

  If there's something that's been missed / or isn't tagged ["Needs backport (0.19)"](https://github.com/bitcoin/bitcoin/issues?q=is%3Aopen+label%3A%22Needs+backport+%280.19%29%22) that you think should be, please comment.

  Currently backports:
  * #17887 - bug-fix macos: give free bytes to F_PREALLOCATE
  * #17980 - test: add missing #include to fix compiler errors

ACKs for top commit:
  laanwj:
    ACK daf2fff236

Tree-SHA512: 8438f992d0c39315a4da4c3f8ab5c92acefada4b0ba5a5cec3775dea2541492d386bf4e7c9e76e1494a6d4cf16a9205287d27ffd23d9c3056f213d733605eeee
2020-01-23 20:48:55 +01:00
Wladimir J. van der Laan
1299a1a11f
qt: Translations update pre-rc1
Tree-SHA512: 0e0d696c32c20e550bda5bd0fe73a73ab1d944f3fb368d50993248ff6feef7373b4feba91dc38e62b180c9854dd4528dfd62e6628bc2b24b12d7c9ff07f34e55
2020-01-23 14:33:52 +01:00
Karl-Johan Alm
daf2fff236
test: add missing #include to fix compiler errors
Github-Pull: #17980
Rebased-From: a5a2654bbc43b5c208418872e5d4c0acbadda5de
2020-01-23 09:41:09 +08:00
Karl-Johan Alm
c8ad23c529
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.

Github-Pull: #17887
Rebased-From: 75163f4729c10c40d2843da28a8c79ab89193f6a
2020-01-23 08:11:10 +08:00
Jim Posen
9d980c1f7f
init: Stop indexes on shutdown after ChainStateFlushed callback.
Currently, the latest index state may not be committed to disk on shutdown.

Github-Pull: #17897
Rebased-From: 9dd58ca611f6f2b59c25d727a4e955333525d345
2020-01-22 17:51:23 +08:00
Hennadii Stepanov
cd67b1dcb8 Use correct C++11 header for std::swap()
Github-Pull: #17634
Rebased-From: 98fbd1cdffaa69357091cc67e959ac21119dfa16
2020-01-15 12:13:02 +00:00
Hennadii Stepanov
b8101fb7ac Fix comparison function signature
This commit fixes build on CentOS 7 with GCC 4.8.5

Github-Pull: #17634
Rebased-From: b66861e2e5e8a49e11e7489cf22c3007bc7082cc
2020-01-15 12:12:43 +00:00
Gregory Sanders
eac49073eb Don't allow implementers to think ScriptHash(Witness*()) results in nesting computation
Github-Pull: #17924
Rebased-From: 6dd59d2e491bc11ab26498668543e65440a3a931
2020-01-15 09:59:47 +00:00
Gregory Sanders
e2c45d89f7 IsUsedDestination shouldn't use key id as script id for ScriptHash
Github-Pull: #17924
Rebased-From: 4b8f1e989f3b969dc628b0801d5c31ebd373719c
2020-01-15 09:58:56 +00:00
Gregory Sanders
a5489c9892 IsUsedDestination should count any known single-key address
Github-Pull: #17621
Rebased-From: 09502452bbbe21bb974f1de8cf53196373921ab9
2020-01-14 10:35:34 +00:00
Adam Jonas
88729d804e Fix issue with conflicted mempool tx in listsinceblock
listsinceblock now checks that returned transactions are not
conflicting with any transactions that are filtered out by
the given blockhash

Co-Authored-By: Michael Chrostowski <michael.chrostowski@gmail.com>

Github-Pull: #17258
Rebased-From: 436ad436434b94982bcb7dc1d13a21949263ef73
2020-01-14 09:34:44 +00:00
João Barbosa
eafcea7a0a gui: Fix duplicate wallet showing up
The slot BitcoinGUI::addWallet can be invoked twice for the same
WalletModel due to a concurrent wallet being loaded after the first `connect()`:

```cpp
 connect(wallet_controller, &WalletController::walletAdded, this, &BitcoinGUI::addWallet);
 connect(wallet_controller, &WalletController::walletRemoved, this, &BitcoinGUI::removeWallet);

 for (WalletModel* wallet_model : m_wallet_controller->getOpenWallets()) {
     addWallet(wallet_model);
```

Github-Pull: #16963
Rebased-From: 6d6a7a8403ae923f189812edebdd95761de0e7f2
2020-01-14 09:34:35 +00:00
Russell Yanofsky
7e66d04770 Drop signal CClientUIInterface::LoadWallet
Github-Pull: #16963
Rebased-From: 81ea66c30e2953dee24d5b127c28daa0d9452a28
2020-01-14 09:34:35 +00:00
João Barbosa
179d55f052 zmq: Fix due to invalid argument and multiple notifiers
Github-Pull: #17445
Rebased-From: 3e730bf90aaf53c41ff3a778f6aac15d163d1c0c
2020-01-14 09:34:35 +00:00
Wladimir J. van der Laan
bb123c6527
Merge #17858: [0.19] Backports
99b54076ff scripts: fix check-symbols & check-security argument passing (fanquake)
4330a1ee7f Update msvc build for Visual Studio 2019 v16.4 (Aaron Clauson)
b0f9b8e648 Moves vcpkg list to a text file and updates the appveyor job and readme to use it. (Aaron Clauson)
cd7b3b254a Updated appveyor config:  - Update build image from Visual Studio 2017 to Visual Studio 2019.  - Updated Qt static library from Qt5.9.7 to Qt5.9.8.  - Added commands to update vcpkg port files (this does not update already installed packages).  - Updated vcpkg package list as per #17309.  - Removed commands setting common project file options. Now done via common.init.vcxproj include.  - Changed msbuild verbosity from normal to quiet. Normal rights a LOT of logs and impacts appveyor job duration. Updated msvc project configs:  - Updated platform toolset from v141 to v142.  - Updated Qt static library from Qt5.9.7 to Qt5.9.8.  - Added ignore for linker warning building bitcoin-qt program.  - Added missing util/str.cpp class file to test_bitcoin project file. (Aaron Clauson)
112144dc52 Add missing typeinfo includes (Wladimir J. van der Laan)
1a6a534665 net: Log to net category for exceptions in ProcessMessages (Wladimir J. van der Laan)
c0dc728206 test: fix bitcoind already running warnings on macOS (fanquake)
5276b0e5a2 util: Add missing headers to util/fees.cpp (Hennadii Stepanov)
4d7875c555 rpc: require second argument only for scantxoutset start action (Andrew Chow)
bda2f5b3c9 cli: fix Fatal LevelDB error when specifying -blockfilterindex=basic twice (Harris)
d14ab7c522 gui: disable File->CreateWallet during startup (fanquake)
b9f1bc0fc1 wallet: unbreak with boost 1.72 (Jan Beich)

Pull request description:

  Backports the following PRs to the 0.19 branch:
  * https://github.com/bitcoin/bitcoin/pull/17654 - Unbreak build with Boost 1.72.0
  * https://github.com/bitcoin/bitcoin/pull/17695 - gui: disable File->CreateWallet during startup
  * https://github.com/bitcoin/bitcoin/pull/17687 - cli: fix Fatal LevelDB error when specifying -blockfilterindex=basic twice
  * https://github.com/bitcoin/bitcoin/pull/17728 - rpc: require second argument only for scantxoutset start action
  * https://github.com/bitcoin/bitcoin/pull/17450 - util: Add missing headers to util/fees.cpp
  * https://github.com/bitcoin/bitcoin/pull/17488 - test: fix "bitcoind already running" warnings on macOS
  * https://github.com/bitcoin/bitcoin/pull/17762 - Log to net category for exceptions in ProcessMessages
  * https://github.com/bitcoin/bitcoin/pull/17364 - Updates to appveyor config for VS2019 and Qt5.9.8 + msvc project fixes
  * https://github.com/bitcoin/bitcoin/pull/17416 - Appveyor improvement - text file for vcpkg package list
  * https://github.com/bitcoin/bitcoin/pull/17736 - Update msvc build for Visual Studio 2019 v16.4
  * https://github.com/bitcoin/bitcoin/pull/17857 - scripts: fix symbol-check & security-check argument passing

  Fixes #17856.

ACKs for top commit:
  sipsorcery:
    ACK (tested: Windows 10 & msvc build) 99b54076ff.

Tree-SHA512: 91313de56fb0825e70a4be30ba0bf561b8c26d7dcf60549185df4f5e3524099398c828bb46faae807b631634d1afd5a1d397fb41e61ecfa0d746e4bf10b923cb
2020-01-08 15:12:25 +01:00
Wladimir J. van der Laan
fd4ec7c720
qt: Periodic translations update for 0.19 branch
Brings back `bitcoin_en` which was accidentally removed last time (see #17886).

Tree-SHA512: a4aaa6f22e9ad3e87952f2a87829d675158cb26ed1fe61ef8e62646c22e21ccc0dec0f890b726f8adb76d7609e0274af8574b67201d30eff941cb60b1b76ff8c
2020-01-08 13:47:27 +01:00
fanquake
99b54076ff
scripts: fix check-symbols & check-security argument passing
The first argument in bin_PROGRAMS (bitcoind) was being silently
dropped and never passed into the check-security.py or check-symbols.py scripts.

This has been the case since the scripts were added to the makefile in
f3d3eaf78e.

Example of the behavior:

```python

import sys
if __name__ == '__main__':
    print(sys.argv)
    # ['args.py', 'b', 'c']

    # if you add some lines to "a",
    # you'll see them here..
    for line in sys.stdin:
        print(line)
```

Github-Pull: #17857
Rebased-From: 71af793512100ee7d508c3fb815af47925fe80ba
2020-01-06 15:50:30 +08:00
Wladimir J. van der Laan
112144dc52
Add missing typeinfo includes
The use of `typeid()` for logging exception types requires this include
according to https://en.cppreference.com/w/cpp/language/typeid.

Github-Pull: #17762
Rebased-From: 4bdd68f301a9cee3360deafc7531c638e923226b
2020-01-05 07:30:49 +08:00
Wladimir J. van der Laan
1a6a534665
net: Log to net category for exceptions in ProcessMessages
Remove the forest of special exceptions, and simply log a short
message to the NET logging category when an exception happens during
packet processing. It is not good to panick end users with errors
that any peer can generate (let alone writing to stderr).

Github-Pull: #17762
Rebased-From: 4d88c3dcb61e7c075ed3dd442044e0eff4e3c8de
2020-01-05 07:29:54 +08:00
fanquake
febf04841f
Merge #17853: [0.19] psbt: handle unspendable psbts
ca5f8deefd Mark PSBTs spending unspendable outputs as invalid in analysis (Andrew Chow)
551583398b Have a PSBTAnalysis state that indicates invalid PSBT (Andrew Chow)

Pull request description:

  Backport of #17524

ACKs for top commit:
  achow101:
    ACK ca5f8deefd

Tree-SHA512: b5f2b951beb9477ac3176a0aade845654d2108ca3a9fbc72097ba4b4797df5419053d6b489bbaa03be08cb8cfdc37a83db8b7642ffa52d42b7aa8ea14aff39cc
2020-01-04 18:31:39 +08:00
fanquake
310b29f9c3
Merge #17859: [0.19] Fix origfee return for bumpfee with feerate arg
bd8c6f12e8 Fix origfee return for bumpfee with feerate arg (Gregory Sanders)

Pull request description:

  Backport of Github-Pull: #17643
  Rebased-From: 02afb0c550dc8529918460c845d1da3adf236eed

ACKs for top commit:
  fanquake:
    ACK bd8c6f12e8 - the appveyor failure is unrelated.
  instagibbs:
    utACK bd8c6f12e8

Tree-SHA512: 7e420a3fe02503194b6fc8eae5277c46289cd6abe131b2513ad80422819e6bafbc7768e7be344d4132ebdbc24846d459ba2a271be184725d818dff77510fa4de
2020-01-04 17:09:52 +08:00
Gregory Sanders
bd8c6f12e8 Fix origfee return for bumpfee with feerate arg
Github-Pull: #17643
Rebased-From: 02afb0c550dc8529918460c845d1da3adf236eed
2020-01-03 18:22:56 +00:00
Hennadii Stepanov
5276b0e5a2
util: Add missing headers to util/fees.cpp
Github-Pull: #17450
Rebased-From: b1315241375211563e9ec00391c4ac5310e1146f
2020-01-03 20:05:16 +08:00
Andrew Chow
4d7875c555
rpc: require second argument only for scantxoutset start action
The second argument of scanobjects is only required for the start action.
Stop and abort actions do not need this.

Github-Pull: #17728
Rebased-From: 7d263571bee8c36fbe3c854b69c6f31cf1ee3b9b
2020-01-03 18:37:54 +08:00
Harris
bda2f5b3c9
cli: fix Fatal LevelDB error when specifying -blockfilterindex=basic twice
Github-Pull: #17687
Rebased-From: 034561f9cd4180ea1c165cb02df6c84444a8d692
2020-01-03 18:36:57 +08:00
fanquake
d14ab7c522
gui: disable File->CreateWallet during startup
Github-Pull: #17695
Rebased-From: d65fafc2f7d98ab2be0a0961e7a3ebe7850c1dca
2020-01-03 18:35:45 +08:00
Jan Beich
b9f1bc0fc1
wallet: unbreak with boost 1.72
wallet/walletutil.cpp:77:23: error: no member named 'level' in 'boost::filesystem::recursive_directory_iterator'
        } else if (it.level() == 0 && it->symlink_status().type() == fs::regular_file && IsBerkeleyBtree(it...
                   ~~ ^

Github-Pull: #17654
Rebased-From: a64e97dd476bda7c7981979d045b0d06d6f7ce47
2020-01-03 18:33:08 +08:00
Andrew Chow
ca5f8deefd Mark PSBTs spending unspendable outputs as invalid in analysis
Github-Pull: #17524
Rebased-From: 773d4572a4864ab7b6380858d07d9579ff6dd9a2
2020-01-03 04:04:38 +00:00
Andrew Chow
551583398b Have a PSBTAnalysis state that indicates invalid PSBT
Invalid PSBTs need to be re-created, so the next role is the
Creator (new PSBTRole). Additionally, we need to know what went
wrong so an error field was added to PSBTAnalysis.

A PSBTAnalysis indicating invalid will have empty everything,
next will be set to PSBTRole::CREATOR, and an error message.

Github-Pull: #17524
Rebased-From: 638e40cb6080800c7b0a7f4028f63326acbe4700
2020-01-03 04:04:38 +00:00
Hennadii Stepanov
a284bbbee8
refactor: Styling w/ clang-format, comment update
Github-Pull: #17427
Rebased-From: 1828c6f05fcbed9ed432b042cc36eee0d80b113d
Tree-SHA512: 140b723bd9c8d8823ecb84d7f774d213a9e9dac45fb0de82c43521cf8276d946feaa1b7c0b7d40f51dbab38c88c53b4680da1965b1e0ce7f858eb35b2c4537da
2019-11-25 10:13:25 +01:00
Hennadii Stepanov
2aba76ce02
qt: Fix missing qRegisterMetaType for size_t
It is required in order to use size_t in QueuedConnections.

Github-Pull: #17427
Rebased-From: 88a94f7bb8ba2b0257315d70717f9af928ca6561
Tree-SHA512: 55accd997209c559dfc8e88b0db189ba314ac31e265ba2f94fa2009f1aba6b96213e2aa8cbad492b1230078f2e6cf1cca7a233dc6f54e9bc449f4e5438330b4d
2019-11-25 10:13:21 +01:00
NullFunctor
6ec0dc195d
fix uninitialized variable nMinerConfirmationWindow
fix uninitialized variable hard code the MinBIP9WarningHeight

fix uninitialized var hard code the MinBIP9WarningHeight instead

Github-Pull: #17449
Rebased-From: edb6b768a4185a4aaa6281ee50a6538f7426cb1e
Tree-SHA512: 6192940e5e13ad1176aa380da9f3287ff1eb0c8c2a78571a6c45fe0e100417452c8503b9ffc5c8b2a89c4a5e8811b9d2bfec95366e1de00f3365ba06959e9a9a
2019-11-14 20:36:44 +01:00
fanquake
2d0b3c0716
cli: fix -getinfo output when compiled with no wallet
Github-Pull: #17368
Rebased-From: 3d05d332693ec860626fc77e6ba50dec94e4e83c
2019-11-08 09:09:45 -05:00
Wladimir J. van der Laan
7358ae6d71
gui: rc3 translations update
Tree-SHA512: 84fae5ac33200ba995384f87d43c3d0b138043e47094dd62731e1558fdc74a8df283046437f1d0c228cdee519bbf9c167a1696a7a4d915f48da97c9524f320c2
2019-10-26 19:49:04 +02:00
fanquake
eb5a899d5a
gui: disable font antialiasing for QR image address
More info available here: https://doc.qt.io/qt-5/qfont.html#StyleStrategy-enum

Github-Pull: #17257
Rebased-From: e156b9d8b974f57253306b693a03aa80322ebc6c
Tree-SHA512: 6e36d626215d5e66796bd3935037eef89ae810e4855e321f9f37b90c3be0b61de21cd655f23bc6a29f41038b5179d92578ab19ab89ccd525d9389ab868456827
2019-10-26 13:07:09 +02:00
João Barbosa
e39c9cff1a
gui: Fix start timer from non QThread
Github-Pull: #17120
Rebased-From: a8f5026d6d992fd8d72908c848c5028f0f9a8cd1
Tree-SHA512: 5f8cbfd5044d2c0df7dbfc54e7d94f93da96d0adecd23007e82acc38bc3c7984a685c9596cbd449f559cf42db9e1b99612765328004c5a45655a8e375482a8a8
2019-10-26 13:02:55 +02:00