Commit Graph

610 Commits

Author SHA1 Message Date
Wladimir J. van der Laan
e6089da994
Merge #13823: qa: quote path in authproxy for external multiwallets
fa67505e1ea007bdc081bc7425fb83d5455d8308 qa: Quote wallet name for rpc path (MarcoFalke)

Pull request description:

  When using external multiwallets they are specified by their full path which might contain non-ascii characters (e.g. umlauts or emojis).

  Fix this by url-quoting the path.

Tree-SHA512: 7cc66514579d9f602f88a6817c5ab43a44c6d3711df452dc904173f0bc34e2c0b2c34877497f06b61f6720c532fa183053f54622dc454e316c89cee7eaa72463
2020-12-18 12:55:45 -06:00
pasta
8fa51dce7d
attempt to fix test failure
Signed-off-by: pasta <pasta@dashboost.org>
2020-12-18 12:55:45 -06:00
Wladimir J. van der Laan
44c7301288
Merge #13603: bitcoin-tx: Stricter check for valid integers
57889e688dd0987a1e087cd48d216a413127601e bitcoin-tx: Stricter check for valid integers (Daniel Kraft)

Pull request description:

  Just calling `atoi` to convert strings to integers does not check for valid integers very thoroughly; in particular, it just ignores everything starting from the first non-numeral character.  Even a string like "foo" is fine and silently returns 0.

  This meant that `bitcoin-tx` would not fail if such a string was passed in various places where an integer is expected (like the `locktime` or an input/output index); this means that it would, for instance, silently accept a typo and interpret it in an unexpected way.

  In this change, we use `ParseInt64` for parsing strings to integers, which actually verifies that the full string is valid as number.  New tests in the `bitcoin-util-test` cover the new error paths.

  This fixes #13599.

Tree-SHA512: 146a0af275e9f57784e5d0582d3defbac35551b54b6b7232f8a0b20db04aa611125e52aa4512ef2f8ed2cafc2a12fe586f9d10ed66d641cff090288f279b1988
2020-12-18 12:55:45 -06:00
MarcoFalke
0a255fec40
Merge #13645: [tests] skip rpc_zmq functional test as necessary
a0b604c166 [tests] skip rpc_zmq functional test when python3 zmq lib is not present (James O'Beirne)

Pull request description:

  As noted in https://github.com/bitcoin/bitcoin/pull/13570/files#r201715904, the `rpc_zmq` functional test should be skipped when the `zmq` python3 package is not installed. This is breaking https://bitcoinperf.com benchmarks at the moment.

Tree-SHA512: ab519ae717f4b7a282640cf0389651723fdc108990aeb9852e8b9e96d61fa1ded2461717ae31558b37ff8401a5b1ccc41f4e858e402b8c3d98563d962599767a
2020-12-18 12:55:45 -06:00
Wladimir J. van der Laan
0da4f596bb
Merge #13452: rpc: have verifytxoutproof check the number of txns in proof structure
d280617bf569f84457eaea546541dc74c67cd1e4 [qa] Add a test for merkle proof malleation (Suhas Daftuar)
ed82f1700006830b6fe34572b66245c1487ccd29 have verifytxoutproof check the number of txns in proof structure (Gregory Sanders)

Pull request description:

  Recent publication of a weakness in Bitcoin's merkle tree construction demonstrates many SPV applications vulnerable to an expensive to pull off yet still plausible attack: https://bitslog.wordpress.com/2018/06/09/leaf-node-weakness-in-bitcoin-merkle-tree-design/

  This change would at least allow `verifytxoutproof` to properly validate that the proof matches a known block, with known number of transactions any time after the full block is processed. This should neuter the attack entirely.

  The negative is that a header-only processed block/future syncing mode would cause this to fail until the node has imported the data required.

  related: #13451

  `importprunedfunds` needs this check as well. Can expand it to cover this if people like the idea.

Tree-SHA512: 0682ec2b622a38b29f3f635323e0a8b6fc071e8a6fd134c954579926ee7b516e642966bafa667016744ce49c16e19b24dbc8801f982a36ad0a6a4aff6d93f82b
2020-12-18 12:55:45 -06:00
Wladimir J. van der Laan
be4345ce12
Merge #13510: Scripts and tools: Obsolete #!/bin/bash shebang
000000035b20402dea3e8168165cd4eefdc97539 Obsolete #!/bin/bash shebang (DesWurstes)

Pull request description:

  > `#!/bin/bash` assumes it is always installed to `/bin/` which can cause issues
  > `#!/usr/bin/env bash` searches the user's `PATH` to find the `bash` binary

  Details: https://github.com/dylanaraps/pure-bash-bible#obsolete-syntax

  I'm open to comments: Should I also fix `#!/bin/sh`?

Tree-SHA512: b47bb4828116aa119f1899c68fee081270d51a898535490b9c616bf0f3660ad953f29c361eafc759bc64cdd54ee6eeecb2d79e9fdb5291a996a515c719805476
2020-12-18 12:55:45 -06:00
PastaPastaPasta
1c6236dcbe
Merge pull request #3870 from PastaPastaPasta/backports-0.17-pr23
Backports 0.17 pr23
2020-12-15 19:05:58 -06:00
pasta
063f7655d0
signrawtransactionwithwallet in feature_dip0020_activation.py
Signed-off-by: pasta <pasta@dashboost.org>
2020-12-15 17:00:05 -06:00
MarcoFalke
3cfe3f6db1
Merge #12720: qa: Avoiding 'file' function name from python2
0dbb32b2cb Avoiding 'file' function name from python2 with more descriptive variable naming (Jeff Rade)

Pull request description:

  @jnewbery Here is PR from review in [#12437](https://github.com/bitcoin/bitcoin/pull/12437)

Tree-SHA512: c61980f4d3170842627cd970e1f6eebaf303843dc5e95a9dcfe3ded08152be533774cb75f56a83af8452b6bcac17c0172cf20e39edf9acefb4a4c255fe893a3b
2020-12-15 17:00:05 -06:00
UdjinM6
db5d906765
tests: Rework feature_new_quorum_type_activation.py using -vbparams (#3873) 2020-12-15 14:45:14 -06:00
Wladimir J. van der Laan
c7a5be4d6b
Merge #12643: [qa] util: Remove unused sync_chain
fa1436c42 [qa] util: Remove unused sync_chain (MarcoFalke)

Pull request description:

  The util function `sync_blocks` already checks for equal chains, so we can remove the unused `sync_chain`.

  Also cleaned up the errors that are printed in case of timeout:

  ```
  AssertionError: Block sync timed out:
    '72a3a3e9dcfd0a09204c3447af0f481d19641eeadbe6a91b8e680ed614bc7712'
    '5032af4ae22ae7a21afdc9d9f516877309c4dd8ef2ecadb9354be7088439b4a6'
    '5032af4ae22ae7a21afdc9d9f516877309c4dd8ef2ecadb9354be7088439b4a6'
  ```
  and
  ```
  AssertionError: Mempool sync timed out:
    {'c2af943d9b321c36e0f5a153a9d3d8b11bdd46ceb28e38f5fd2c722e3edb3563'}
    set()
    set()
  ```

Tree-SHA512: cb4ad30e3e3773072f59afa2c81cfa27bd8f389a93f02acb919990298627fcfbaa53a3d3944d827cc8a5d009871e42a47ea09e9bb93e85c22e3af6a24a574e5d
2020-12-15 11:06:27 -06:00
pasta
185e4b128c
Merge #12443: qa: Move common args to bitcoin.conf
face722 qa: Move common args to bitcoin.conf (MarcoFalke)

Pull request description:

  Beside removing duplicates of the same args in the code, this actually helps with debugging after a test failure.

  For example, `bitcoin-qt` has `server` turned off, so you'd have to turn it on every time, if you wanted to debug a temporary test datadir created by the test framework.
  Also, `keypool` would fill up if you forget to specify `-keypool=1`.

Tree-SHA512: 996bec8738dc0fce7297ab1fc5b4fbe3aa31b9b6241f8c4e685db728925363ccaca6145ad1edc6bee2f360e02ac4b9a53fcdff74eb79de90793393742d52b559
2020-12-15 11:06:26 -06:00
pasta
2bda82bdbe
Fix #10579
Signed-off-by: pasta <pasta@dashboost.org>
2020-12-15 11:06:25 -06:00
Pieter Wuille
a2f107424b
Merge #10579: [RPC] Split signrawtransaction into wallet and non-wallet RPC command
d60234885b Add test for signrawtransaction (Andrew Chow)
eefff65a4b scripted-diff: change signrawtransaction to signrawtransactionwithwallet in tests (Andrew Chow)
1e79c055cd Split signrawtransaction into wallet and non-wallet (Andrew Chow)

Pull request description:

  This PR is part of #10570. It also builds on top of #10571.

  This PR splits `signrawtransaction` into two commands, `signrawtransactionwithkey` and `signrawtransactionwithwallet`. `signrawtransactionwithkey` requires private keys to be passed in and does not use the wallet for any signing. `signrawtransactionwithwallet` uses the wallet to sign a raw transaction and does not have any parameters to take private keys.

  The `signrawtransaction` RPC has been marked as deprecated and will call the appropriate RPC command based upon the parameters given. A test was added to check this behavior is still consistent with the original behavior.

  All tests that used `signrawtransaction` have been updated to use one of the two new RPCs. Most uses were changed to `signrawtransactionwithwallet`. These were changed via a scripted diff.

Tree-SHA512: d0adf5b4cd7077639c504ec07bee262a3b94658d34db0a5c86a263b6393f7aa62f45129eafe29a7c861aa58440dd19348ee0c8b685e8a62d6f4adae8ec8f8cb3
2020-12-15 11:06:25 -06:00
pasta
335303ad26
Fix #12436
Signed-off-by: pasta <pasta@dashboost.org>
2020-12-15 11:06:24 -06:00
Wladimir J. van der Laan
6f37eab266
Merge #12436: [rpc] Adds a functional test to validate the transaction version number in the RPC output
09b30db Asserts that the tx version number is a signed 32-bit integer. (251)

Pull request description:

  This PR attempts to resolve #11561 by addressing the feedback from @MarcoFalke; and @gmaxwell in #12430.

  Commit 30e9d24 adds a functional test to `rpc_rawtransaction.py` to assert that the transaction version number in the RPC output is a signed 32-bit integer.

  The functional test uses the raw transaction data from Mainnet transaction `c659729a7fea5071361c2c1a68551ca2bf77679b27086cc415adeeb03852e369`.

Tree-SHA512: d78f3120b9aa04537561ab5584769a838b25e162c5caa6e1543256fb27538aa4c708c939fb5ba93ccb3fa676c2d92ce8eb9cc78869f80ac96be64a7bec7bebd0
2020-12-15 11:06:19 -06:00
UdjinM6
b559a8f904
Backporting Statoshi and bitcoin#16728 (#2515)
* Backport Statoshi

This backports some of https://github.com/jlopp/statoshi.

Missing stuff: README.md and client name changes, segwit and fee estimation stats.

Fix RejectCodeToString

Fix copy-paste mistake s/InvalidBlockFound/InvalidChainFound/

* Merge #16728: move-only: move coins statistics utils out of RPC

8a3b2eb17572ca2131778d52cc25ec359470a90f move-only: move coins statistics utils out of RPC (James O'Beirne)

Pull request description:

  This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11):

  Parent PR: #15606
  Issue: #15605
  Specification: https://github.com/jamesob/assumeutxo-docs/tree/master/proposal

  ---

  In the short-term, this move-only commit will help with fuzzing (https://github.com/bitcoin/bitcoin/pull/15606#issuecomment-524482297). Later, these procedures will be used to compute statistics (particularly a content hash) for UTXO sets coming in from snapshots.

  Most easily reviewed with `git ... --color-moved=dimmed_zebra`. A nice follow-up would be adding unittests, which I'll do if nobody else gets around to it.

ACKs for top commit:
  MarcoFalke:
    ACK 8a3b2eb17572ca2131778d52cc25ec359470a90f, checked --color-moved=dimmed-zebra

Tree-SHA512: a187d2f7590ad2450b8e8fa3d038c80a04fc3d903618c24222d7e3172250ce51badea35860c86101f2ba266eb4354e6efb8d7d508b353f29276e4665a1efdf74

* Fix 16728

* Modernize StatsdClient

- Reuse some functionality from netbase
- Switch from GetRand to FastRandomContext
- Drop `using namespace std` and add `// namespace statsd`

* Introduce PeriodicStats and make StatsdClient configurable via -stats<smth> (enabled/host/port/ns/period)

* Move/rename tip stats from CheckBlock to ConnectBlock

* Add new false positives to lint-format-strings.py

* Add snprintf in statsd_client to the list of known violations in lint-locale-dependence.sh

* Fix incorrect include guard

* Use bracket syntax includes

* Replace magic numbers with defaults

* Move connection stats calculation into its own function

And bail out early if stats are disabled

* assert in PeriodicStats

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>

Co-authored-by: MarcoFalke <falke.marco@gmail.com>
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
2020-12-15 10:22:23 -06:00
UdjinM6
0a8664fd33
rpc: Add masternode payments (#3863)
* rpc: Implement `masternode payments`

Returns an array of deterministic masternodes and their payments for a specific block

* tests: Add rpc_masternode.py

* Apply review suggestions

* Add amounts calculated per masternode and per block

* Tweak help string

* Update src/rpc/masternode.cpp

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

* rpc: Check against vector size instead of decrementing a counter

* rpc: Use `std::vector::begin()` instead of `std::begin(std::vector)`

* Drop set_dash_dip8_activation in rpc_masternode.py

* Apply suggestions from code review

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
Co-authored-by: xdustinface <xdustinfacex@gmail.com>
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
2020-12-14 20:15:09 -06:00
UdjinM6
b95cf017c3
tests: Enable InstantSend and ChainLocks by default (#3853)
* tests: Enable ChainLocks by default

* tests: Enable InstantSend (including filtering) by default
2020-12-12 00:57:39 -06:00
tomthoros
5a026be52c
Consensus: DIP-0020: Dash opcode updates - OP_CAT and OP_SPLIT. (#3824)
* DIP-0020: Dash opcode updates - enable OP_CAT and OP_SPLIT (renamed from OP_SUBSTR)

* DIP-0020: Dash opcode updates - DEPLOYMENT_V17 activates dip0020 opcodes

* Add/tweak MAX_SCRIPT_ELEMENT_SIZE tests for OP_CAT and OP_SPLIT

* Check nDefaultMaxNumSize in OP_SPLIT tests

* Purify DISABLED_OPCODE tests for OP_CAT and OP_SPLIT, fix DoTest to actually preserve the DIP0020 flag

* Fix `warning: '&' within '|' [-Wbitwise-op-parentheses]`

* Rework/simplify feature_dip0020_activation.py

* DIP-0020: Remove functionally redundant tests.

* Fix file permissions for feature_dip0020_activation.py

* DIP-0020: fix typo

* Update src/test/script_tests.cpp

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

* Update test/functional/feature_dip0020_activation.py

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

* DIP-0020: improve comments

* DIP-0020: dont use negative booleans

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2020-12-11 22:17:10 +00:00
UdjinM6
cf64339517
consenus: Implement LLMQ_100_67 quorums (#3844)
* Add LLMQ_100_67 quorums

* Re-use DEPLOYMENT_V17 bit to activate LLMQ_100_67 quorums

* Add LLMQ_TEST_NEW quorum and test its activation

* Tweak mine_quorum to work correctly with multiple quorum types

And to avoid a potentialy endless "while" loop

* llmq: Rename IsQuorumTypeEnabledAtBlock -> IsQuorumTypeEnabled

* chainparams|test: Rename llmq_test_new -> llmq_test_v17

* chainparams|consensus|llmq: Rename LLMQ_TEST_NEW -> LLMQ_TEST_V17

* Tweak few strings and the name of the test

* llmq: Make GetEnabledQuorumTypes return a vector of LLMQTypes, introduce GetLLMQParams

Signed-off-by: pasta <pasta@dashboost.org>

* Tweak minSize

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>

* Exclude LLMQ_100_67 from Concentrated Recovery

* Update test/functional/feature_new_quorum_type_activation.py

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>

Co-authored-by: xdustinface <xdustinfacex@gmail.com>
Co-authored-by: pasta <pasta@dashboost.org>
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
2020-12-10 00:08:05 +01:00
UdjinM6
88d54054f9
zmq: Send islock notifications for txes received after their islocks were received (#3852)
* Send islock notifications for txes received after their islocks were received

Also drop UpdateWalletTransaction - its name makes no sense and it's only used once.

* tests: early islocks should trigger notifications once a corresponding tx is received

* Tweak tests

- fail if an unexpected islock is received
- drop unused variable

* llmq: Drop `c_str()` in two log statements

* test: Move create_islock to DashTestFramework in test_framework.py

Just because it's used the same way in two files

* test: Simplify send tx in zmq test

* format

Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2020-12-09 19:52:11 +00:00
UdjinM6
adee9504a6
tests: Fix a couple of rare mnsync issues (#3847)
* tests: Bump mocktime in smaller intervals while (not) signaling

This is needed to avoid triggering `CMasternodeSync::Reset()`.

* tests: force faucet node to finish mnsync in prepare_datadirs

* test: Drop redundant force_finish_mnsync in interface_zmq_dash.py

Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2020-12-05 23:39:38 +00:00
UdjinM6
18c4ad1468
tests: Tweak sporks.py to work with any defaults (#3842) 2020-12-01 17:48:35 +00:00
dustinface
3a02c6d74c
rpc|governance|test: Store prepared governance objects and implement "gobject list-prepared" (#3811)
* governance: Add CGovernanceObject::ToJson()

* rpc: Save governance objects before tx commit in gobject_prepare

* rpc: Add "gobject list-prepared"

* test: Implement tests for "gobject list-prepared"

* test: Add "feature_governance_objects.py" to BASE_SCRIPTS in test_runner

* rpc: Rename parameter: limit => count

* rpc: Rephrase "Maximal" => "Maximum"

* rpc|test: Set default count of "gobject list-prepared" to 10

* rpc: Align behaviour/message or count parameter with existing commands

* rpc|test: Reverse order of "gobject list-prepared" output
2020-12-01 03:55:29 +00:00
PastaPastaPasta
a70ea0cafd
tests: adjust some comments in interface_zmq_dash.py (#3839)
Signed-off-by: pasta <pasta@dashboost.org>
2020-11-30 17:01:31 +00:00
UdjinM6
46eddc8e03
tests: Make sure txes are actually included in blocks we mine in feature_llmq_is_retroactive.py (#3833) 2020-11-28 19:19:59 +00:00
UdjinM6
02d083616d
tests: Few trivial tweaks/cleanups (#3834)
* Convert comments into log output in feature_llmq_dkgerrors.py

* Remove llmq folder in wallet_backup.py

* There is no `-blockmaxweight` option in Dash
2020-11-28 19:18:01 +00:00
UdjinM6
071ec6c4fc
tests: Let mine_quorum handle expected connections count based on spork21 state (#3832) 2020-11-28 19:16:31 +00:00
UdjinM6
b2cc7a8c96
rpc: Add submit option to protx register(_fund) RPC commands (#3830)
Setting `submit` to `false` will force these RPCs to return raw tx hex instead of sending it to the network.
2020-11-28 19:14:29 +00:00
dustinface
90f7d7ff2a
test: Implement tests for all dash related ZMQ notifications (#3804)
* test: Add more C++ representing classes in message.py

* test: Add interface_zmq_dash.py

* test: Add interface_zmq_dash.py to BASE_SCRIPTS in test_runner.py

* test: Adjust hashrecoveredsig parsing

* Force node0 to finish syncing

* Avoid `uint256_to_string(uint256_from_str())`

* Be more specific in imports

* Plural for "publisher" when makes sense

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-11-27 17:55:28 +03:00
PastaPastaPasta
e72164e719
rpc: implement whitelist for commands needed by Dash Platform (#3738)
* implement whitelist for commands needed by Dash Platform

Signed-off-by: pasta <pasta@dashboost.org>

* Add test for platform command filtering

Signed-off-by: pasta <pasta@dashboost.org>

* Use less if statements

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

* make defaultPlatformUser const

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

* test: Make rpc_platform_filter.py executable

* test: Refactor tests in rpc_platform_filter.py

* minor modifications to rpc_platform_filter.py

Signed-off-by: pasta <pasta@dashboost.org>

* test: Expand test cases in rpc_platform_filter.py

* rpc: Use std::map instead of std::vector for platformAllowedCommands

* rpc: Improve readability and be more specific about the reject reason

* rpc: Fix comment

* rpc|httprpc: Rename RPC_PROTECTED_COMMAND to RPC_PLATFORM_RESTRICTION

* minor modifications to server.cpp

Signed-off-by: pasta <pasta@dashboost.org>

* add help text

Signed-off-by: pasta <pasta@dashboost.org>

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: xdustinface <xdustinfacex@gmail.com>
2020-11-24 02:39:50 +01:00
UdjinM6
ac6878ffa2
tests: Fix feature_llmq_simplepose.py and feature_llmq_signing.py (#3781)
* tests: Use lower mocktime bump value to reset masternode probes in feature_llmq_simplepose.py

Bumping `50 * 60 + 1` should be enough, see https://github.com/dashpay/dash/blob/master/src/llmq/quorums_utils.cpp#L218-L222. Bumping `60 * 60 + 1` interferes with mnsync reset, see https://github.com/dashpay/dash/blob/master/src/masternode/masternode-sync.cpp#L112-L119.

* Fix expected connection count in llmq-signing.py and llmq-simplepose.py

* Sleep a couple of seconds to let mn sync tick to happen

* Move helper functions out of run_test

* Let helper functions return expect_contribution_to_fail

* No need to check for "punished" state in test_banning

* Split mninfos in test_banning and mine_quorum into "online" and "valid" sets

Needed for wait_for_masternode_probes in mine_quorum. Also, refactor and fix test_banning while at it.
2020-11-19 14:42:35 +03:00
dustinface
e7c91558d3
test: Add and use uint256_to_string + improve some hash/string conversions (#3800)
* test: Introduce uint256_to_string

* test: Use uint256_to_string in some places

* Avoid converting back and forth, reuse known string represntations of hashes for blocks and txes instead of converting sha256

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2020-11-17 20:40:15 +01:00
MarcoFalke
16a4608347
Merge #13082: Tests: don't test against min relay fee information in mining_prioritisetransaction.py
bd9d67b752 Don't test against min relay fee information in mining_prioritisetransaction.py (Kristaps Kaupe)

Pull request description:

  Follow-up on #13032.

  As advised by @MarcoFalke.

Tree-SHA512: a690ff2e6499b0b4ee6a952c849e363738b9a5ae553266e1780fc7910a6b01e240d71b434fe87da53dc43f6e26cec23a900ec16aab64bb8f6765c26d7aa37c56
2020-11-17 14:34:34 -05:00
Wladimir J. van der Laan
1f9bf1c7cc
Merge #13032: Output values for "min relay fee not met" error
1accfbc Output values for "min relay fee not met" error (Kristaps Kaupe)

Pull request description:

  It is already done this way for "mempool min fee not met" error.

Tree-SHA512: 829db78ecc066cf93b8e93ff1aeb4e7b98883cf45f341d5be6e6b4dff4135f3f54fa49b3a6f12eb43f676a9ba54f981143c9887f786881e584370434a9566cfd
2020-11-17 14:34:34 -05:00
Wladimir J. van der Laan
90038da3d9
Merge #13022: [qa] Attach node index to test_node AssertionError and print messages
80a5e59 [qa] Attach node index to test_node AssertionError and print messages (James O'Beirne)

Pull request description:

  In the midst of fighting with https://github.com/bitcoin/bitcoin/pull/12873 it became apparent that there're a number of assertions and print statements which are emitted by test nodes but don't identify the node in question. This change makes debugging a bit easier by adding identifying information to non-logger test_node-related error messages.

Tree-SHA512: 7cc86f2c81f4b3fdba15ec9a2d21a84c4b083629e845e82288087c3affbbdc5c68e74067621856cc97fe84fbc8cb4f5ca4977a51ef381e5d74515df8eb001239

fix 13022

Signed-off-by: pasta <pasta@dashboost.org>
2020-11-17 14:34:34 -05:00
Wladimir J. van der Laan
ca0cdbfbe8
Merge #13030: [bugfix] [wallet] Fix zapwallettxes/multiwallet interaction.
1f83839 [wallet] [tests] Test disallowed multiwallet params (John Newbery)
3476e3c [wallet] Fix zapwallettxes/multiwallet interaction. (John Newbery)

Pull request description:

  `-zapwallettxes` should be disallowed when starting bitcoin in multiwallet mode.

  There's code in `WalletInit::ParameterInteraction()` to disallow `-zapwallettxes` when running in multiwallet mode. This code functioned as expected when passing the parameter `-zapwallettxes=1`, but not when passing the parameter `-zapwallettxes` (ie without the value specified). Fix that and add a test.

  The new test in the
  _[wallet] [tests] Test disallowed multiwallet params_ commit reproduces the bug and should fail against master.

  Fixes #12505

Tree-SHA512: 6cd921717e9c7d2773ca84c946c310c2adec8430e37cbecdb33a620f510db3058a72bd328411812ba415111bc52a3367b332c9d15a37a92ccfd7ae785d2f32ab
2020-11-17 14:32:37 -05:00
MarcoFalke
2161985a63
Merge #12947: Wallet hd functional test speedup and clarification
6cba60ace2 speed up wallet_hd.py and clarify/augment checks (Gregory Sanders)

Pull request description:

  With `keypool=0` I see no reason to do 300 addresses and sends.

  (with --enable-debug)

  Before patch:
  real	1m10.412s
  user	0m49.772s
  sys	0m3.988s

  After:
  real	0m11.566s
  user	0m3.344s
  sys	0m4.648s

  Also added check, since I failed to understand that on startup the wallet already knows about funds by rescanning blocks newer than oldest key birthdate.

Tree-SHA512: cf90f7fe6a437b8b7b1f0707464b9c06085233167826f1a12c3871684664d4d572e13f03e13a718e4537cac39713271c4ac3d9b983e10080b50647caf3cbe82d
2020-11-09 17:46:33 -05:00
dustinface
bd4a2edb03
test: Fix default value of COutPoint.n to match C++ (#3802) 2020-11-10 00:59:01 +03:00
dustinface
748d91dd7a
test: Add and use DashTestFramework.get_recovered_sig (#3801)
* test: Introduce DashTestFramework.get_recovered_sig

* test: Use DashTestFramework.get_recovered_sig
2020-11-10 00:58:49 +03:00
MarcoFalke
f9dce09f6c
Merge #12918: test: Assert on correct variable
bf08fc5b6b test: Assert on correct variable (Karl-Johan Alm)

Pull request description:

Tree-SHA512: bdc4a0f94d49ab29234ee429585c6c73e46ff096c46d6053eb15c0a84cdea5490425cd842d051d41e158450945b229239b08002c193fdcc212eb2ca0e63aa653
2020-11-01 01:57:59 -04:00
UdjinM6
f5bbf20879
Allow partial match for expected strings in feature_*index.py` tests 2020-10-26 20:35:28 -04:00
UdjinM6
aafa64d021
Fix feature_txindex.py 2020-10-26 20:35:28 -04:00
pasta
a901879764
additional changes for assert_start_raises_init_error
Signed-off-by: pasta <pasta@dashboost.org>
2020-10-26 20:35:28 -04:00
pasta
641a666ef1
fix linter
Signed-off-by: pasta <pasta@dashboost.org>
2020-10-26 20:35:28 -04:00
MarcoFalke
7de10e4737
Merge #12284: Remove assigned but never used local variables. Enable Travis checking for unused local variables.
ea04bf7862 Enable flake8 warning F841 ("local variable 'foo' is assigned to but never used") (practicalswift)
169f3e8637 Remove assigned but never used local variables (practicalswift)

Pull request description:

  Remove assigned but never used local variables. Enable Travis checking for unused local variables.

Tree-SHA512: d6052ec9044c5d1f03d874ea3c8addd5a156779213ef9200f89d3ae53230f2fd1691aff405c3dae14178e5ef09912c4432e92f606ef4a5220ed9daa140cdee81
2020-10-26 20:35:28 -04:00
MarcoFalke
04b375a95d
Merge #12810: [Tests] Fix a typo at assert_start_raises_init_error() and use specific exception for initialization error
8394300859 [Tests] fix a typo in TestNode.assert_start_raises_init_error() (Roman Zeyde)

Pull request description:

  `self.wait_util_stopped()` should be `self.wait_until_stopped()`.

  Also, use a specific Exception subclass for indicating node failure to start (instead of using `AssetionError` and an `except Exception` clause).

  Following https://travis-ci.org/bitcoin/bitcoin/jobs/359066226#L2726 and depending on #12806 (which fixes the root cause of the Travis test failure).

Tree-SHA512: 7bd5a95586a412472ef9dffdb086789d7275ddaf862724e21cebb3418d0c97e6d89b4d1a58375e42114060d028403d6eab89e3a1e9a833ffe8dadf3439ab1fe2
2020-10-26 20:35:28 -04:00
pasta
4e17167c2d
fix 12718
Signed-off-by: pasta <pasta@dashboost.org>
2020-10-22 11:36:39 -04:00
Wladimir J. van der Laan
7a880f29df
Merge #12718: [Tests] Require exact match in assert_start_raises_init_eror (jnewbery)
fae1374 qa: Allow for partial_match when checking init error (MarcoFalke)
5812273 [Tests] Require exact match in assert_start_raises_init_eror() (John Newbery)
0ec08a6 [Tests] Move assert_start_raises_init_error method to TestNode (John Newbery)

Pull request description:

  Extracted from #12379, because the changes are important on their own.

  This allows for exact testing, since the match can be specified with a strict regex. Internal details (such as exact formatting of the error message) can still be fuzzed away by regex wildcards.

Tree-SHA512: 605d2c9c42362a32d42321b066637577a026d0bb8cfc1c9f5737a4ca6503ffe85457a5122cea6e1101053ccc6c8aa1bbae3602e1fa7d2988bf7d5c275f412f66
Signed-off-by: pasta <pasta@dashboost.org>
2020-10-22 11:36:39 -04:00