Commit graph

21656 commits

Author SHA1 Message Date
Brannon King 3aa90ebd15 updated build docker file to include libc++abi 2020-03-26 15:39:51 +02:00
Brannon King 69c7dfa2bf bumped version 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 3c33175787 fix multi-build mkdir conflict 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
David A. Harding 2558be26e4 [0.17] [Doc] Backport release note about PSBT doc 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
Wladimir J. van der Laan 5641252942 doc: Clean out release notes post-0.17.1
Tree-SHA512: 0cd6e97156da2dea9a9b557083d8140c17f85f6e718d5fcb73aa67460480b6437b665fad147bf4eacd13570aeb25a29f28c35b7fb0365ae630b2edf05901a431
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
Wladimir J. van der Laan eea8378f6c doc: Fill in authors and changelog for 0.17.1 release notes
Tree-SHA512: dc23ae43e81ad379b48bb8dc6da21cde647a7edc778563b8b8266dfe84d9baa70bf4565915e276ea0e14aa96ce677547494da0aadeebfcc961f53430c7bb84ea
2020-03-26 15:39:50 +02:00
João Barbosa 4904d21df0 qa: Ensure wallet unload during walletpassphrase timeout
0.17 branch doesn't include #12493 which changed encryptwallet behavior. For that
reason the test is adjusted.

Github-Pull: #14453
Rebased-From: 8907df9
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
MarcoFalke 0050a7e979 qa: Avoid race in p2p_invalid_block by waiting for the block request
Github-Pull: #14700
Rebased-From: fa21568208
2020-03-26 15:39:50 +02:00
Chun Kuan Lee 56df309b1b build: Add bitcoin-tx.exe into Windows installer
Github-Pull: #14698
Rebased-From: 5c5902acc5
2020-03-26 15:39:50 +02:00
gustavonalle 7871dd58fe [wallet] Ensure wallet is unlocked before signing
Github-Pull: #14310
Rebased-From: db15805668
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 afb4aabe3b doc: Clean out release notes after 0.17.0.1
Tree-SHA512: c04192e3b93537f4b37f5ea55fd455b26dd7d902da3b5f8b59ef6fa4590cf413b72fc11bba330a8fd7fa3938b09e6c1d35171806ab5ce85d6b99681953c291a5
2020-03-26 15:39:50 +02:00
MarcoFalke 70998ac794 qa: Run all tests even if wallet is not compiled
Github-Pull: #14180
Rebased-From: fac9539836
2020-03-26 15:39:50 +02:00
Wladimir J. van der Laan 3a102216f4 doc: Update release notes for 0.17.0.1 2020-03-26 15:39:50 +02:00
Wladimir J. van der Laan e4152f67f3 doc: Clean out release notes after release 0.17.0
Tree-SHA512: 0b641fdf4cf4ac6a6f9f5c1b45d65c4449b0d7bb777ba57498e389840ba7a37bfc0569ce5e70f0ac998785fc4eea600ecf6f7c7d83d86513997f4033bcc14a5d
2020-03-26 15:39:50 +02:00
Suhas Daftuar 826219f99c [qa] backport: Test for duplicate inputs within a transaction 2020-03-26 15:39:50 +02:00