Commit graph

1968 commits

Author SHA1 Message Date
lbrynaut
6651d45ce9 Fix unit tests. 2020-03-26 15:40:14 +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
0c130f40c7 allow rest/block/height.json
changes from review, added integration test
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
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
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
gustavonalle
7871dd58fe [wallet] Ensure wallet is unlocked before signing
Github-Pull: #14310
Rebased-From: db15805668
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
Suhas Daftuar
826219f99c [qa] backport: Test for duplicate inputs within a transaction 2020-03-26 15:39:50 +02: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
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
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
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
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
fanquake
c0dc728206
test: fix bitcoind already running warnings on macOS
On macOS, pidof installed via brew returns b'' rather than None.
Account for this, to remove spurious warnings from the test_runner.

Github-Pull: #17488
Rebased-From: 1c23ea5fe67b88fd72a1ff640dd1bbb21a34fbf4
2020-01-04 18:50:43 +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
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
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
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
Wladimir J. van der Laan
8afa602f30
Merge #16727: wallet: Explicit feerate for bumpfee
c812aba394 test bumpfee fee_rate argument (ezegom)
9f25de3d9e rpc bumpfee check fee_rate argument (ezegom)
88e5f997df rpc bumpfee: add fee_rate argument (ezegom)
1a4c791cf4 rpc bumpfee: move feerate estimation logic into separate method (ezegom)

Pull request description:

  Taking over for https://github.com/bitcoin/bitcoin/pull/16492 which seems to have gone inactive.

  Only minor commit cleanups, rebase, and some help text fixes on top of previous PR. Renamed `feeRate` to `fee_rate` to reflect updated guidelines.

ACKs for top commit:
  Sjors:
    Code review ACK c812aba
  laanwj:
    ACK c812aba394

Tree-SHA512: 5f7f51bd780a573ccef1ccd72b0faf3e5d143f6551060a667560c5163f7d9480e17e73775d1d7bcac0463f3b6b4328f0cff7b27e39483bddc42a530f4583ce30
2019-10-02 15:55:19 +02:00
MarcoFalke
696b5eb179
Merge #16987: test: Correct docstring param name.
e28d8f8936 Correct docstring param name. (John Bampton)

Pull request description:

  Small fix to correct the Python docstring.

ACKs for top commit:
  laanwj:
    ACK e28d8f8936
  MarcoFalke:
     ACK e28d8f8

Tree-SHA512: 7bec1c6b166c768dd69fc6b94eb80ceeaa0258985b9a11956e336940d403785e7d09d0084d9b870b637ec784db044cf4c0f8ac3f0fcdf431090f003016ef13a9
2019-09-30 12:12:59 -04:00
Wladimir J. van der Laan
c3a8e097b1
Merge #16991: qa: Fix service flag comparison check in rpc_net test (luke-jr)
9c23ebd6b1 qa: Fix service flag comparison check in rpc_net test (Luke Dashjr)

Pull request description:

  Rebase of #16936

ACKs for top commit:
  darosior:
    ACK 9c23ebd6b1

Tree-SHA512: 74f287740403da1040ab1e235ef6eba4e304f3ee5d57a3b25d1e2e1f2f982d256528d398a4d6cb24ba393798e680a8f46cd7dae54ed84ab2c747e96288f1f884
2019-09-30 15:32:18 +02:00
ezegom
c812aba394 test bumpfee fee_rate argument 2019-09-30 09:31:53 -04:00
Luke Dashjr
9c23ebd6b1 qa: Fix service flag comparison check in rpc_net test 2019-09-30 11:45:47 +02:00
Wladimir J. van der Laan
e2ce392aec test: Avoid whitespace linting in qt translations 2019-09-30 09:55:54 +02:00
Wladimir J. van der Laan
9edb2b6550
Merge #16953: doc: Improve test READMEs
43e7d576f5 doc: Improve test READMEs (Fabian Jahr)

Pull request description:

  General improvements on READMEs for unit tests and functional tests:
  - Give unit test readme a headline
  - Move general information on `src/test` folder to the top
  - Add information on logging and debugging unit tests
  - Improve debugging and logging information in functional testing
  - Include all available log levels in functional tests

ACKs for top commit:
  laanwj:
    ACK 43e7d576f5

Tree-SHA512: 22b27644992ba5d99a885cd51b7a474806714396fcea1fd2d6285e41bdf3b28835ad8c81449099e3ee15a63d57b3ab9acb89c425d9855ed1d9b4af21db35ab03
2019-09-30 09:27:35 +02:00
John Bampton
e28d8f8936 Correct docstring param name. 2019-09-30 12:15:18 +10:00
Wladimir J. van der Laan
a6c8aed1f1
Merge #16817: rpc: Fix casing in getblockchaininfo to be inline with other fields
1a02edb3f2 [RPC] Fix casing in getblockchaininfo to be inline with the rest of the response (Dan Gershony)

Pull request description:

  The response in the RPC result `startTime` is camel cased while the rest of the response seems to be lower cased.

  If this was intentional please ignore and close this PR.

  Note: RPC field case changes might break existing callers

ACKs for top commit:
  laanwj:
    ACK 1a02edb3f2

Tree-SHA512: 6f0eaf2b4aaf73c9a9bf1fbd4af59af5f95fc012fa88f94e050e6ae273b3ad647f5729df53bfce91e1a925fe4fd7b14818908bb6131a81413a555137d1007d7c
2019-09-27 15:11:00 +02:00
Fabian Jahr
43e7d576f5 doc: Improve test READMEs 2019-09-26 19:04:58 +02:00
Dan Gershony
1a02edb3f2 [RPC] Fix casing in getblockchaininfo to be inline with the rest of the response
The response in the RPC result `starttime` is camel cased while the rest of the response seems to be lower cased.

If this was intentional please ignore this PR.

Note: case might break existing callers

Reflect the change in the test data

Change to snake case
2019-09-26 15:20:55 +01:00
MarcoFalke
4c4ff4911a
Merge #16961: test: Remove python dead code linter
f4beb4996d test: Remove python dead code linter (Wladimir J. van der Laan)

Pull request description:

  Primarily I'd like to remove this because it is very imprecise, due to Python's dynamic nature, giving it a large list of false positives that need to be listed as exceptions. See for example #16906.

  It's also a frequent source of complaints. I'm doubtful of the usefulness of checking for dead code in a linter in the first place.
  Having some dead code in the test framework for a while is not a
  disaster.

ACKs for top commit:
  sdaftuar:
    utACK f4beb4996d
  practicalswift:
    ACK f4beb4996d -- diff looks correct
  jamesob:
    ACK f4beb4996d

Tree-SHA512: 329b1555210311d5d15799fd2cb794b3208b0ac4d8a2ffaf4dece1bcc3e0e8b1fe952d5e7a394f94a98919cab579fb579eae7db2a796cc9a1a42ef495dd17507
2019-09-25 13:14:22 -04:00
Wladimir J. van der Laan
742cd77f6f
Merge #16929: test: follow-up to rpc: default maxfeerate value as BTC/kB
6659810e2f test: use named args for sendrawtransaction calls (Jon Atack)
5c1cd78b7e doc: improve rawtransaction code/test docs (Jon Atack)
acc14c5093 test: fix incorrect value in rpc_rawtransaction.py (Jon Atack)

Pull request description:

  Follow-up to PR #16521.

  - Fix incorrect value in rpc_rawtransaction test as per https://github.com/bitcoin/bitcoin/pull/16521/files#r325842308
  - Improve the code docs
  - Use named arguments as per https://github.com/bitcoin/bitcoin/pull/16521/files#r310715127

  Happy to squash or keep only the first commit if the others are too fixup-y.

ACKs for top commit:
  laanwj:
    ACK 6659810e2f

Tree-SHA512: bf5258f23802ab3ba3defb8791097e08e63f3e2af21023f832cd270dc88d1fa04349e921d69f9f5fedac5dce5cd3c1cc46b48febbede4bc18dccb8be994565b2
2019-09-25 11:51:31 +02:00
Wladimir J. van der Laan
f4beb4996d test: Remove python dead code linter
Primarily I'd like to remove this because it is very imprecise, due to
Python's dynamic nature, giving it a large list of false positives that
need to be listed as exceptions. See for example #16906.

It's also a frequent source of complaints. I'm doubtful of the
usefulness of checking for dead code in a linter in the first place.
Having some dead code in the test framework for a while is not a
disaster.
2019-09-25 11:16:09 +02:00
fanquake
27fcb40fc0
doc: replace outdated OpenSSL comment in test README 2019-09-25 15:37:38 +08:00
MarcoFalke
13377b7a69
Merge #16918: test: Make PORT_MIN in test runner configurable
fa69588537 test: Make PORT_MIN in test runner configurable (MarcoFalke)

Pull request description:

  This is needed when some ports in the port range are used by other processes. Note that simply assigning the ports dynamically does not work:

  * We spin up several nodes per test (each node gets its own port)
  * We run several tests in parallel

  So to avoid nodes from different tests colliding on ports, the port assignment must be deterministic (can not be dynamic).

  Fixes: #10869

ACKs for top commit:
  practicalswift:
    ACK fa69588537 -- diff looks correct
  promag:
    ACK fa69588537.

Tree-SHA512: e79adb015e7de79064e2d14336c38bc9672bd779ad6c52917721897e73f617c39d32c068a369c26670002a6c4ab95a71ef3a6878ebdd9710e02f410e2f7bcd14
2019-09-22 10:14:50 -04:00
Jon Atack
6659810e2f
test: use named args for sendrawtransaction calls
involving more than one argument.
2019-09-22 12:27:28 +02:00
Jon Atack
5c1cd78b7e
doc: improve rawtransaction code/test docs 2019-09-21 16:01:20 +02:00
Jon Atack
acc14c5093
test: fix incorrect value in rpc_rawtransaction.py 2019-09-21 15:55:51 +02:00
MarcoFalke
f8b0b190aa
Merge #16920: test: Fix extra_args in wallet_import_rescan.py
fa2e038691 test: Fix extra_args in wallet_import_rescan.py (MarcoFalke)

Pull request description:

  Bug introduced by me (🤦‍♂️) in fa25668e1c

  For reference:

  ```
  >>> a = [[]]*2
  >>> a[0] += ['ONE']
  >>> a
  [['ONE'], ['ONE']]

  >>> a = [[] for _ in range(2)]
  >>> a[0] += ['ONE']
  >>> a
  [['ONE'], []]

ACKs for top commit:
  theStack:
    utACK fa2e038

Tree-SHA512: 7d75a0d06233d013d62198ea95793612242254d5d90f393d01b2beef5abc78d6e85c796532311638f16cfed3b66a7ae41a108c0fe6f0f5d7f6616b042c670df7
2019-09-20 08:19:59 -04:00
fanquake
04321494ae
Merge #16921: tests: Add information on how to add Vulture suppressions
72a18a73af tests: Add information on how to add Vulture suppressions (practicalswift)

Pull request description:

  Add information on how to add `vulture` suppressions.

  As requested by MarcoFalke in https://github.com/bitcoin/bitcoin/issues/16906#issuecomment-533264107 -- your wish is my command! :)

ACKs for top commit:
  fanquake:
    ACK 72a18a73af - similar sort of message as in [lint-spelling.sh](https://github.com/bitcoin/bitcoin/blob/master/test/lint/lint-spelling.sh).

Tree-SHA512: b347f8cea33d4b0ba987a972979b0ac3423938084fea923a2c457a8081bc839a94ad818689d147477104b9197dc35be413f76a96026cd1507b4411d7513e3464
2019-09-20 17:07:38 +08:00
practicalswift
72a18a73af tests: Add information on how to add Vulture suppressions 2019-09-19 21:13:26 +00:00
MarcoFalke
fa2e038691
test: Fix extra_args in wallet_import_rescan.py 2019-09-19 15:25:00 -04:00
MarcoFalke
fa69588537
test: Make PORT_MIN in test runner configurable 2019-09-19 12:03:40 -04:00
fridokus
96299a9d6c Test: Move common function assert_approx() into util.py 2019-09-19 14:53:40 +02:00
fanquake
9bf5768dd6
Merge #16885: doc: Update tx-size-small comment with relevant CVE disclosure
c4b0c08f7c Update tx-size-small comment with relevant CVE disclosure (Gregory Sanders)

Pull request description:

  Code first introduced under https://github.com/bitcoin/bitcoin/pull/11423 with essentially no description and no discussion.

ACKs for top commit:
  MarcoFalke:
    ACK c4b0c08f7c
  fanquake:
    ACK c4b0c08f7c

Tree-SHA512: 95d5c92998b8b1e944c477dbaee265b62612b6e815099ab31d9ff580b4dff777abaf7f326a284644709f918aa1510412d62310689b1250ef6e64de7b19ca9f71
2019-09-19 08:51:30 +08:00
Gregory Sanders
c4b0c08f7c Update tx-size-small comment with relevant CVE disclosure 2019-09-18 16:21:44 -04:00