Commit graph

18357 commits

Author SHA1 Message Date
Brannon King
90afa72147 eliminated fuzzer test on osx 2019-07-02 08:44:33 -06:00
Brannon King
3d9e8f595f changed unit test to deterministic rand 2019-07-02 00:15:27 -06:00
Brannon King
cce0fde619 updated build docker file to include libc++abi 2019-07-01 23:39:24 -06:00
Brannon King
41417bf469 bumped version 2019-07-01 15:46:28 -06:00
Brannon King
09e2ba2d68 post-merge fixes 2019-07-01 14:44:28 -06:00
lbrynaut
c18f0ed8ea Add a test for locktime transactions. 2019-07-01 14:44:28 -06:00
Brannon King
9a67b514c9 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
2019-07-01 14:44:28 -06:00
Brannon King
8d955fdd22 added a test for putting a lot of data into the claimtrie
updated to dodge expiration fork
2019-07-01 14:44:28 -06:00
Brannon King
24269e177f support coinbasetxn capability in getblocktemplate 2019-07-01 14:44:28 -06:00
Brannon King
36ccf3e903 fix multi-build mkdir conflict 2019-07-01 14:44:28 -06:00
Brannon King
c751b27e54 upped the default validation period 2019-07-01 14:44:28 -06:00
Brannon King
f2462c74b3 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
2019-07-01 14:44:28 -06:00
Brannon King
4a4c091c55 fixed ancestors not all in claim trie on packageFees condition 2019-07-01 14:44:28 -06:00
Brannon King
7eddd19521 made cache match legacy_master, removed my bad assert in undo 2019-07-01 14:44:28 -06:00
Brannon King
9cb4064adb added claimtrie field back to getblocktemplate
I also included a test to ensure that we don't forget it next time
2019-07-01 14:44:28 -06:00
Brannon King
5a393f5b14 Undo compatibility (#281)
* added test for claimname RPC
2019-07-01 14:44:28 -06:00
lbrynaut
ffe68d634f Fix a bug that treats all claims as our own wallet txs. 2019-07-01 14:44:28 -06:00
Brannon King
e560834489 allow rest/block/height.json
changes from review, added integration test
2019-07-01 14:44:28 -06:00
Brannon King
141e583cce code reuse between miner & validator
originally from BvbFan
2019-07-01 14:44:28 -06:00
Brannon King
c7cabf0e96 pulled in a few minor keepers from the other rebase branch 2019-07-01 14:43:59 -06:00
Brannon King
21f065aff9 fixed small claim names coming out as numeric 2019-07-01 14:43:59 -06:00
Brannon King
40a3668c97 fixed slow-running unit tests 2019-07-01 14:43:59 -06:00
lbrynaut
a08967a572 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>.
2019-07-01 14:43:59 -06:00
Wladimir J. van der Laan
c165df198d
Merge #16163: 0.17.2 backport: build with -fstack-reuse=none and test case
b5a4abeca2 Add test for GCC bug 90348 (Pieter Wuille)
05fb9f7fbb build with -fstack-reuse=none (MarcoFalke)

Pull request description:

  Backports:

  * [build with -fstack-reuse=none](https://github.com/bitcoin/bitcoin/pull/15983)
  * [Add test for GCC bug 90348](https://github.com/bitcoin/bitcoin/pull/15985)

  b5a4abeca2 has been modified to replace the `setup_common.h` with `test_bitcoin.h` include.

ACKs for commit b5a4ab:
  Empact:
    ACK b5a4abeca2 by review of the linked PRs, the GCC bug and option, and visual inspection/comparison of the ported code
  laanwj:
    Code review + relevancy for backport ACK b5a4abeca2

Tree-SHA512: cdfdc6e2f208e8dc6a8a86cd7a7ed0f2a6f96604a0663efc970f580f693c1975353341fa8434b23de3cb681e03c6918e3342178752ed595d16a0ec50db913266
2019-06-13 12:57:51 +02:00
Pieter Wuille
b5a4abeca2
Add test for GCC bug 90348
Github-Pull: #15985
Rebased-From: 58e291cfad
2019-06-07 10:21:26 +02:00
MarcoFalke
05fb9f7fbb
build with -fstack-reuse=none
Github-Pull: #15983
Rebased-From: faf38bc056
2019-06-07 10:07:36 +02:00
Wladimir J. van der Laan
6cf81b01b4
Merge #15575: 0.17: Backport 15297
fe95f84542 qa: Test .walletlock file is closed (João Barbosa)
2e9e904a5d wallet: Close wallet env lock file (João Barbosa)
22cdb6cf59 wallet: Close dbenv error file db.log (João Barbosa)
f20513bd71 Tests: add unit tests for GetWalletEnv (Pierre Rochard)
85c6263ddb Trivial: add doxygen-compatible comments relating to BerkeleyEnvironment (Pierre Rochard)
f22d02f537 Free BerkeleyEnvironment instances when not in use (Russell Yanofsky)
0a9af2d4cb wallet: Create IsDatabaseLoaded function (Chun Kuan Lee)
7751ea37b6 Refactor: Move m_db pointers into BerkeleyDatabase (Russell Yanofsky)
caf1146b13 wallet: Add trailing wallet.dat when detecting duplicate wallet if it's a directory. (Chun Kuan Lee)
34da2b7c76 tests: add test case for loading copied wallet twice (Chun Kuan Lee)
8965b6ab47 wallet: Fix duplicate fileid (Chun Kuan Lee)
16e5759455 wallet: Refactor to use WalletLocation (João Barbosa)
21693ff0b7 wallet: Add WalletLocation utility class (João Barbosa)
1c98a758d0 No longer shutdown after encrypting the wallet (Andrew Chow)
435df68c62 Move BerkeleyEnvironment deletion from internal method to callsite (Andrew Chow)
048fda2a66 After encrypting the wallet, reload the database environment (Andrew Chow)
f455979eb1 Add function to close all Db's and reload the databae environment (Andrew Chow)

Pull request description:

  This PR backports the following pull requests:
   - #12493 [wallet] Reopen CDBEnv after encryption instead of shutting down
   - #14350 Add WalletLocation class
   - #14320 [bugfix] wallet: Fix duplicate fileid detection
   - #14552 wallet: detecting duplicate wallet by comparing the db filename.
   - #11911 Free BerkeleyEnvironment instances when not in use
   - #15297 wallet: Releases dangling files on BerkeleyEnvironment::Close

Tree-SHA512: 52d759bc4f140ca96e39b37746cc20e786741b08ddc658a87ea77fbcfbb481f1c7b75aba4fc57ca9bca8ca7154e535da1fdd650fd114873655cd85c490c79f14
2019-03-20 20:38:55 +01:00
João Barbosa
fe95f84542 qa: Test .walletlock file is closed
Github-Pull: #15297
Rebased-From: d3bf3b9
2019-03-12 23:24:11 +00:00
João Barbosa
2e9e904a5d wallet: Close wallet env lock file
Close .walletlock file when a BerkeleyEnvironment is deleted.

Github-Pull: #15297
Rebased-From: 2f8b8f4
2019-03-12 23:24:11 +00:00
João Barbosa
22cdb6cf59 wallet: Close dbenv error file db.log
The error file db.log is opened by BerkeleyEnvironment instance and
should be closed after dbenv is closed.

Github-Pull: #15297
Rebased-From: 8602a1e
2019-03-12 23:24:11 +00:00
Pierre Rochard
f20513bd71 Tests: add unit tests for GetWalletEnv
Github-Pull: #11911
Rebased-From: 88b1d95
2019-03-12 23:25:49 +00:00
Pierre Rochard
85c6263ddb Trivial: add doxygen-compatible comments relating to BerkeleyEnvironment
Github-Pull: #11911
Rebased-From: 14bc2a1
2019-03-12 23:25:36 +00:00
Russell Yanofsky
f22d02f537 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
2019-03-12 23:24:11 +00:00
Chun Kuan Lee
0a9af2d4cb wallet: Create IsDatabaseLoaded function
Github-Pull: #14552
Rebased-From: 5912031
2019-03-11 21:54:44 +00:00
Russell Yanofsky
7751ea37b6 Refactor: Move m_db pointers into BerkeleyDatabase
This is a refactoring change that doesn't affect behavior. The motivation
behind the change is give BerkeleyEnvironment objects access to
BerkeleyDatabase objects so it will be possible to simplify the duplicate
wallet check and more reliably avoid opening the same databases twice.

Github-Pull: #14552
Rebased-From: c456fbd
2019-03-11 21:54:44 +00:00
Chun Kuan Lee
caf1146b13 wallet: Add trailing wallet.dat when detecting duplicate wallet if it's a directory.
Github-Pull: #14552
Rebased-From: 15c93f0
2019-03-11 21:54:44 +00:00
Chun Kuan Lee
34da2b7c76 tests: add test case for loading copied wallet twice
Github-Pull: #14320
Rebased-From: 4ea7732
2019-03-11 21:54:44 +00:00
Chun Kuan Lee
8965b6ab47 wallet: Fix duplicate fileid
Github-Pull: #14320
Rebased-From: 2d796fa
2019-03-11 21:54:44 +00:00
João Barbosa
16e5759455 wallet: Refactor to use WalletLocation
Github-Pull: #14350
Rebased-From: 65f3672
2019-03-11 21:54:44 +00:00
João Barbosa
21693ff0b7 wallet: Add WalletLocation utility class
Github-Pull: #14350
Rebased-From: 01a4c09
2019-03-11 21:54:44 +00:00
Andrew Chow
1c98a758d0 No longer shutdown after encrypting the wallet
Since the database environment is flushed, closed, and reopened during
EncryptWallet, there is no need to shut down the software anymore.

Github-Pull: #12493
Rebased-From: c1dde3a
2019-03-11 13:20:41 +00:00
Andrew Chow
435df68c62 Move BerkeleyEnvironment deletion from internal method to callsite
Instead of having the object destroy itself, having the caller
destroy it.

Github-Pull: #12493
Rebased-From: a769461
2019-03-11 13:20:22 +00:00
Andrew Chow
048fda2a66 After encrypting the wallet, reload the database environment
Calls ReloadDbEnv after encrypting the wallet so that the database
environment is flushed, closed, and reopened to prevent unencrypted
keys from being saved on disk.

Github-Pull: #12493
Rebased-From: d7637c5
2019-03-11 13:19:56 +00:00
Andrew Chow
f455979eb1 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
2019-03-11 13:19:05 +00:00
Wladimir J. van der Laan
392d1382c1
Merge #15315: [0.17] [Doc] Backport release note about PSBT doc
807add9f5d [0.17] [Doc] Backport release note about PSBT doc (David A. Harding)

Pull request description:

  #15314 removes a release note from master for a doc that is backported to 0.17.  This adds the note to the 0.17 branch.  The only difference in the text is that the `master` in the URL has been changed to `0.17`.

Tree-SHA512: b81af561ad6cf608e3b957d7c50fe6d9b0818cfbd16313599d6dadb4b60e9e3345fef949c4e2ed16cdecfd62201e3e099907f1510e4d16a9f33625163c84c5a2
2019-02-02 12:30:09 +01:00
David A. Harding
807add9f5d
[0.17] [Doc] Backport release note about PSBT doc 2019-02-01 09:16:40 -05:00
Wladimir J. van der Laan
30db5cc641
Merge #15002: 0.17: Backport #14941
0cd9ad208c rpc: Make unloadwallet wait for complete wallet unload (João Barbosa)

Pull request description:

  #14941 makes `unloadwallet` a synchronous call meaning that it waits for the wallet to fully unload/delete.

Tree-SHA512: df7a490306ee2cca399129a4ebfba4b19b65fe67d1657ec3518352fe453327cb347010f94cf7fe4a60aeb51c928cb9ad6b24c40123fd0b9dc0aab5920a59f48d
2019-01-31 15:35:30 +01:00
Wladimir J. van der Laan
09a9238c04
Merge #15252: [0.17] Backport: Update zmq to 4.3.1
8418707286 Update zmq to 4.3.1 (Dimitris Apostolou)

Pull request description:

  Backports #15188 to the 0.17 branch.

  Addresses https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-6250.

Tree-SHA512: f8047a22430dcc92ef713e72281286c4cad2fbe3cd6880cb16b9f8c83bdc481a72539ff5fd373133ac006409ca083db68368e56df47a50798963e77fb3e579f2
2019-01-30 16:29:56 +01:00
MarcoFalke
1220b91fa7
Merge #15251: [0.17] doc: Remove errant paste from walletcreatefundedpsbt for nLocktime replaceable
c42f4177ce Remove errant past from walletcreatefundedpsbt for nLocktime replaceability (Gregory Sanders)

Pull request description:

  Backports #15213 to the 0.17 branch.

Tree-SHA512: f676e0b510b3ae76bf2ae46c7be289837a6d0152972c551ad6a837aab57ec74ee529c309163c8b7e3df446c2f30f148e920702dc31504cc239f99ad4a4607114
2019-01-25 11:56:54 -05:00
Dimitris Apostolou
8418707286
Update zmq to 4.3.1
Addresses https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-6250

Github-Pull: #15188
Rebased-From: 3046e5fc01
2019-01-25 11:52:39 +08:00