Skip to content

Conversation

jnewbery
Copy link
Contributor

@jnewbery jnewbery commented Apr 25, 2018

Next step in #12952. Removes all usage of the 'account' API from the wallet functional tests, except:

  • rpc_deprecated.py (which specifically tests the -deprecatedrpc=accounts command line argument is working properly).
  • wallet_labels.py (which tests that both the 'label' and 'account' APIs work in V0.17).

'account' API usage for both of those tests can be removed once V0.17 has been branched.

Also excluded is:

  • wallet_importprunedfunds.py (which fails due to a bitcoind OOM error)

@jnewbery jnewbery force-pushed the remove_functional_tests_accounts branch from 5489efd to e55ab86 Compare April 25, 2018 20:28
@jnewbery jnewbery mentioned this pull request Apr 25, 2018
6 tasks
@laanwj
Copy link
Member

laanwj commented Apr 26, 2018

Nice!
Concept ACK.

@jonasschnelli
Copy link
Contributor

Concept ACK.
I think combining some commits (especially the flake8 fixes) would help in review.

@laanwj
Copy link
Member

laanwj commented May 1, 2018

This currently fails Travis due to an OOM issue exposed by wallet_importprunedfunds.py

Ref: this issue is tracked in #13078, and so this PR depends on that being fixed

@laanwj laanwj added the Tests label May 1, 2018
@jnewbery jnewbery changed the title Remove 'account' API from wallet functional tests [Don't merge yet] Remove 'account' API from wallet functional tests May 1, 2018
@jnewbery jnewbery force-pushed the remove_functional_tests_accounts branch from e55ab86 to 09de916 Compare May 1, 2018 15:06
@jnewbery
Copy link
Contributor Author

jnewbery commented May 1, 2018

I've squashed all the flake8 fixes into a single commit as requested by @jonasschnelli , and opened a PR for just those fixes at #13136.

@jnewbery jnewbery force-pushed the remove_functional_tests_accounts branch from 09de916 to 659e92b Compare May 1, 2018 15:32
maflcko pushed a commit that referenced this pull request May 1, 2018
…l tests

a533834 [tests] Fix flake8 warnings in several wallet functional tests (John Newbery)

Pull request description:

  Fixes flake8 warnings in several wallet functional tests.

  Several wallet functional tests need rewrite to remove the accounts API (#13075). To prepare for that, I fixed all the flake8 warnings in those tests.

  #13075 is blocked on a bitcoind bug. This PR is just the flake8 fixes so we're not completely blocked.

Tree-SHA512: 2dc1d589b2f8f4318083a681e487532d0f8f3d57e8bc8f37b660b728ffc33329b88e9251eb223104aea89f293c3f4074ca700fe690e645617326b859da3e93c3
@jnewbery jnewbery force-pushed the remove_functional_tests_accounts branch 2 times, most recently from 5b0ec78 to 5c1fcb9 Compare May 1, 2018 19:21
@jnewbery jnewbery changed the title [Don't merge yet] Remove 'account' API from wallet functional tests [tests] Remove 'account' API from wallet functional tests May 1, 2018
@jnewbery
Copy link
Contributor Author

jnewbery commented May 1, 2018

  • Rebased on master (to pick up the flake8 fixes)
  • Moved the wallet_importprunedfunds.py change to a separate PR (since it exposes a bitcoind OOM error)
  • Squashed all remaining commits.

Should be a fairly straightforward review.

@maflcko
Copy link
Member

maflcko commented May 1, 2018

tests fail on travis

@jnewbery jnewbery force-pushed the remove_functional_tests_accounts branch from 5c1fcb9 to 6b7a4ea Compare May 1, 2018 20:57
@jnewbery
Copy link
Contributor Author

jnewbery commented May 1, 2018

Thanks @MarcoFalke . Should now be fixed.

@sipa
Copy link
Member

sipa commented May 1, 2018

Concept ACK

@@ -25,7 +25,7 @@ class KeypoolRestoreTest(BitcoinTestFramework):
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 2
self.extra_args = [['-deprecatedrpc=accounts'], ['-deprecatedrpc=accounts', '-keypool=100', '-keypoolmin=20']]
self.extra_args = [[], ['-keypool=100', '-keypoolmin=20']]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does keypoolmin do?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this was added in d34957e and it is fine to just remove.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

{"category": "receive", "amount": Decimal("0.1")},
{"txid": txid, "account": "watchonly"})
assert not [tx for tx in self.nodes[0].listtransactions("*", 100, 0, False) if "label" in tx and tx["label"] == "watchonly"]
txs = [tx for tx in self.nodes[0].listtransactions("*", 100, 0, True) if "label" in tx and tx['label'] == 'watchonly']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Could use named args for those True and False?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't mix positional and named args, so I've named them all.

@maflcko
Copy link
Member

maflcko commented May 1, 2018

utACK 6b7a4ea7e9929d0ad65c7caf822f44ab6c01a475. Some style nits/questions.

@meshcollider
Copy link
Contributor

Concept ACK

Removes usage of account API from the following functional tests:

- wallet_listreceivedby.py
- wallet_basic.py
- wallet_keypool_topup.py
- wallet_txn_clone.py
- wallet_listsinceblock.py
- wallet_import_rescan.py
- wallet_listtransactions.py
- wallet_txn_doublespend.py
@jnewbery jnewbery force-pushed the remove_functional_tests_accounts branch from 6b7a4ea to 5d53661 Compare May 2, 2018 21:54
@jnewbery
Copy link
Contributor Author

jnewbery commented May 2, 2018

Thanks for the reviews. I've addressed @MarcoFalke 's comments.

→ git diff 6b7a4ea7e9929d0ad65c7caf822f44ab6c01a475 5d536619abda745c298fd827a856df775f223241
diff --git a/test/functional/wallet_keypool_topup.py b/test/functional/wallet_keypool_topup.py
index 30a0c9a76..d657dc30c 100755
--- a/test/functional/wallet_keypool_topup.py
+++ b/test/functional/wallet_keypool_topup.py
@@ -25,7 +25,7 @@ class KeypoolRestoreTest(BitcoinTestFramework):
     def set_test_params(self):
         self.setup_clean_chain = True
         self.num_nodes = 2
-        self.extra_args = [[], ['-keypool=100', '-keypoolmin=20']]
+        self.extra_args = [[], ['-keypool=100']]
 
     def run_test(self):
         wallet_path = os.path.join(self.nodes[1].datadir, "regtest", "wallets", "wallet.dat")
diff --git a/test/functional/wallet_listtransactions.py b/test/functional/wallet_listtransactions.py
index 3de65b9b5..7cf2e456c 100755
--- a/test/functional/wallet_listtransactions.py
+++ b/test/functional/wallet_listtransactions.py
@@ -94,8 +94,8 @@ class ListTransactionsTest(BitcoinTestFramework):
         txid = self.nodes[1].sendtoaddress(multisig["address"], 0.1)
         self.nodes[1].generate(1)
         self.sync_all()
-        assert not [tx for tx in self.nodes[0].listtransactions("*", 100, 0, False) if "label" in tx and tx["label"] == "watchonly"]
-        txs = [tx for tx in self.nodes[0].listtransactions("*", 100, 0, True) if "label" in tx and tx['label'] == 'watchonly']
+        assert not [tx for tx in self.nodes[0].listtransactions(dummy="*", count=100, skip=0, include_watchonly=False) if "label" in tx and tx["label"] == "watchonly"]
+        txs = [tx for tx in self.nodes[0].listtransactions(dummy="*", count=100, skip=0, include_watchonly=True) if "label" in tx and tx['label'] == 'watchonly']
         assert_array_result(txs, {"category": "receive", "amount": Decimal("0.1")}, {"txid": txid})
 
         self.run_rbf_opt_in_test()

@maflcko maflcko merged commit 5d53661 into bitcoin:master May 10, 2018
maflcko pushed a commit that referenced this pull request May 10, 2018
5d53661 [tests] Remove 'account' API from wallet functional tests (John Newbery)

Pull request description:

  Next step in #12952. Removes all usage of the 'account' API from the wallet functional tests, except:

  - rpc_deprecated.py (which specifically tests the `-deprecatedrpc=accounts` command line argument is working properly).
  - `wallet_labels.py` (which tests that both the 'label' and 'account' APIs work in V0.17).

  'account' API usage for both of those tests can be removed once V0.17 has been branched.

  Also excluded is:

  - `wallet_importprunedfunds.py` (which fails due to a bitcoind OOM error)

Tree-SHA512: 6701b32f83d2d47597ba093ded665d7aa630f7a9c759ff15e3e33a3e3bc7600e8d29cf4e72aed5f8f9f6769cc9b614c681951720eab1ed2473f5f8dec57e7a6f
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Nov 13, 2018
maflcko pushed a commit that referenced this pull request Nov 14, 2018
…by label

da427db Rename ListTransactions filter variable (Russell Yanofsky)
65b740f [wallet] Restore ability to list incoming transactions by label (Russell Yanofsky)

Pull request description:

  This change partially reverts #13075 and #14023.

  Fixes #14382

Tree-SHA512: 8c4e56104b3a45784cdc06bae8e5facdfff04fe3545b63a35e0ec2e440a41b79d84833ca4c4e728d8af7ebb8a519303a9eda7bee4bbfb92bd50c58587a33eb30
HashUnlimited pushed a commit to HashUnlimited/chaincoin that referenced this pull request Nov 26, 2018
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 19, 2020
…funds.py

38040c3 [tests] Remove accounts from wallet_importprunedfunds.py (John Newbery)

Pull request description:

  This was split from bitcoin#13075 to not block review/merge of that PR.

Tree-SHA512: 631d7139ed2bda5222ec395cc75720261e2e1f741dba04723d09fe04ef6cf92222a3679d886026ec33e2db2d1e2fa1a0f36c2451581d0f733a9939a98c7118ab
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 24, 2020
…funds.py

38040c3 [tests] Remove accounts from wallet_importprunedfunds.py (John Newbery)

Pull request description:

  This was split from bitcoin#13075 to not block review/merge of that PR.

Tree-SHA512: 631d7139ed2bda5222ec395cc75720261e2e1f741dba04723d09fe04ef6cf92222a3679d886026ec33e2db2d1e2fa1a0f36c2451581d0f733a9939a98c7118ab
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 27, 2020
…funds.py

38040c3 [tests] Remove accounts from wallet_importprunedfunds.py (John Newbery)

Pull request description:

  This was split from bitcoin#13075 to not block review/merge of that PR.

Tree-SHA512: 631d7139ed2bda5222ec395cc75720261e2e1f741dba04723d09fe04ef6cf92222a3679d886026ec33e2db2d1e2fa1a0f36c2451581d0f733a9939a98c7118ab
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request Jul 27, 2020
…funds.py

38040c3 [tests] Remove accounts from wallet_importprunedfunds.py (John Newbery)

Pull request description:

  This was split from bitcoin#13075 to not block review/merge of that PR.

Tree-SHA512: 631d7139ed2bda5222ec395cc75720261e2e1f741dba04723d09fe04ef6cf92222a3679d886026ec33e2db2d1e2fa1a0f36c2451581d0f733a9939a98c7118ab
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request Jul 27, 2020
…funds.py

38040c3 [tests] Remove accounts from wallet_importprunedfunds.py (John Newbery)

Pull request description:

  This was split from bitcoin#13075 to not block review/merge of that PR.

Tree-SHA512: 631d7139ed2bda5222ec395cc75720261e2e1f741dba04723d09fe04ef6cf92222a3679d886026ec33e2db2d1e2fa1a0f36c2451581d0f733a9939a98c7118ab
xdustinface pushed a commit to xdustinface/dash that referenced this pull request Dec 18, 2020
…nal tests

5d53661 [tests] Remove 'account' API from wallet functional tests (John Newbery)

Pull request description:

  Next step in bitcoin#12952. Removes all usage of the 'account' API from the wallet functional tests, except:

  - rpc_deprecated.py (which specifically tests the `-deprecatedrpc=accounts` command line argument is working properly).
  - `wallet_labels.py` (which tests that both the 'label' and 'account' APIs work in V0.17).

  'account' API usage for both of those tests can be removed once V0.17 has been branched.

  Also excluded is:

  - `wallet_importprunedfunds.py` (which fails due to a bitcoind OOM error)

Tree-SHA512: 6701b32f83d2d47597ba093ded665d7aa630f7a9c759ff15e3e33a3e3bc7600e8d29cf4e72aed5f8f9f6769cc9b614c681951720eab1ed2473f5f8dec57e7a6f
xdustinface pushed a commit to xdustinface/dash that referenced this pull request Dec 18, 2020
…nal tests

5d53661 [tests] Remove 'account' API from wallet functional tests (John Newbery)

Pull request description:

  Next step in bitcoin#12952. Removes all usage of the 'account' API from the wallet functional tests, except:

  - rpc_deprecated.py (which specifically tests the `-deprecatedrpc=accounts` command line argument is working properly).
  - `wallet_labels.py` (which tests that both the 'label' and 'account' APIs work in V0.17).

  'account' API usage for both of those tests can be removed once V0.17 has been branched.

  Also excluded is:

  - `wallet_importprunedfunds.py` (which fails due to a bitcoind OOM error)

Tree-SHA512: 6701b32f83d2d47597ba093ded665d7aa630f7a9c759ff15e3e33a3e3bc7600e8d29cf4e72aed5f8f9f6769cc9b614c681951720eab1ed2473f5f8dec57e7a6f
xdustinface pushed a commit to xdustinface/dash that referenced this pull request Dec 18, 2020
…nal tests

5d53661 [tests] Remove 'account' API from wallet functional tests (John Newbery)

Pull request description:

  Next step in bitcoin#12952. Removes all usage of the 'account' API from the wallet functional tests, except:

  - rpc_deprecated.py (which specifically tests the `-deprecatedrpc=accounts` command line argument is working properly).
  - `wallet_labels.py` (which tests that both the 'label' and 'account' APIs work in V0.17).

  'account' API usage for both of those tests can be removed once V0.17 has been branched.

  Also excluded is:

  - `wallet_importprunedfunds.py` (which fails due to a bitcoind OOM error)

Tree-SHA512: 6701b32f83d2d47597ba093ded665d7aa630f7a9c759ff15e3e33a3e3bc7600e8d29cf4e72aed5f8f9f6769cc9b614c681951720eab1ed2473f5f8dec57e7a6f
xdustinface pushed a commit to xdustinface/dash that referenced this pull request Dec 22, 2020
…nal tests

5d53661 [tests] Remove 'account' API from wallet functional tests (John Newbery)

Pull request description:

  Next step in bitcoin#12952. Removes all usage of the 'account' API from the wallet functional tests, except:

  - rpc_deprecated.py (which specifically tests the `-deprecatedrpc=accounts` command line argument is working properly).
  - `wallet_labels.py` (which tests that both the 'label' and 'account' APIs work in V0.17).

  'account' API usage for both of those tests can be removed once V0.17 has been branched.

  Also excluded is:

  - `wallet_importprunedfunds.py` (which fails due to a bitcoind OOM error)

Tree-SHA512: 6701b32f83d2d47597ba093ded665d7aa630f7a9c759ff15e3e33a3e3bc7600e8d29cf4e72aed5f8f9f6769cc9b614c681951720eab1ed2473f5f8dec57e7a6f
xdustinface pushed a commit to xdustinface/dash that referenced this pull request Dec 22, 2020
… incoming transactions by label

89306ab [wallet] Restore ability to list incoming transactions by label (Russell Yanofsky)

Pull request description:

  Backport of PR bitcoin#14411 to v0.17.

  This change partially reverts bitcoin#13075 and bitcoin#14023.

  Fixes bitcoin#14382

Tree-SHA512: 1f8300e1a79e826cd706561265b8788deef505fa510be1a76ed9a62e5fca37cf6a741423ac0e5de2a36d6e8b9f25f141885455aacacbbf6474814e6eae406a27
xdustinface pushed a commit to xdustinface/dash that referenced this pull request Dec 22, 2020
…nal tests

5d53661 [tests] Remove 'account' API from wallet functional tests (John Newbery)

Pull request description:

  Next step in bitcoin#12952. Removes all usage of the 'account' API from the wallet functional tests, except:

  - rpc_deprecated.py (which specifically tests the `-deprecatedrpc=accounts` command line argument is working properly).
  - `wallet_labels.py` (which tests that both the 'label' and 'account' APIs work in V0.17).

  'account' API usage for both of those tests can be removed once V0.17 has been branched.

  Also excluded is:

  - `wallet_importprunedfunds.py` (which fails due to a bitcoind OOM error)

Tree-SHA512: 6701b32f83d2d47597ba093ded665d7aa630f7a9c759ff15e3e33a3e3bc7600e8d29cf4e72aed5f8f9f6769cc9b614c681951720eab1ed2473f5f8dec57e7a6f
xdustinface pushed a commit to xdustinface/dash that referenced this pull request Dec 22, 2020
… incoming transactions by label

89306ab [wallet] Restore ability to list incoming transactions by label (Russell Yanofsky)

Pull request description:

  Backport of PR bitcoin#14411 to v0.17.

  This change partially reverts bitcoin#13075 and bitcoin#14023.

  Fixes bitcoin#14382

Tree-SHA512: 1f8300e1a79e826cd706561265b8788deef505fa510be1a76ed9a62e5fca37cf6a741423ac0e5de2a36d6e8b9f25f141885455aacacbbf6474814e6eae406a27
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request May 21, 2021
…nctional tests

a533834 [tests] Fix flake8 warnings in several wallet functional tests (John Newbery)

Pull request description:

  Fixes flake8 warnings in several wallet functional tests.

  Several wallet functional tests need rewrite to remove the accounts API (bitcoin#13075). To prepare for that, I fixed all the flake8 warnings in those tests.

  bitcoin#13075 is blocked on a bitcoind bug. This PR is just the flake8 fixes so we're not completely blocked.

Tree-SHA512: 2dc1d589b2f8f4318083a681e487532d0f8f3d57e8bc8f37b660b728ffc33329b88e9251eb223104aea89f293c3f4074ca700fe690e645617326b859da3e93c3
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request May 25, 2021
…nctional tests

a533834 [tests] Fix flake8 warnings in several wallet functional tests (John Newbery)

Pull request description:

  Fixes flake8 warnings in several wallet functional tests.

  Several wallet functional tests need rewrite to remove the accounts API (bitcoin#13075). To prepare for that, I fixed all the flake8 warnings in those tests.

  bitcoin#13075 is blocked on a bitcoind bug. This PR is just the flake8 fixes so we're not completely blocked.

Tree-SHA512: 2dc1d589b2f8f4318083a681e487532d0f8f3d57e8bc8f37b660b728ffc33329b88e9251eb223104aea89f293c3f4074ca700fe690e645617326b859da3e93c3
TheArbitrator pushed a commit to TheArbitrator/dash that referenced this pull request Jun 4, 2021
…nctional tests

a533834 [tests] Fix flake8 warnings in several wallet functional tests (John Newbery)

Pull request description:

  Fixes flake8 warnings in several wallet functional tests.

  Several wallet functional tests need rewrite to remove the accounts API (bitcoin#13075). To prepare for that, I fixed all the flake8 warnings in those tests.

  bitcoin#13075 is blocked on a bitcoind bug. This PR is just the flake8 fixes so we're not completely blocked.

Tree-SHA512: 2dc1d589b2f8f4318083a681e487532d0f8f3d57e8bc8f37b660b728ffc33329b88e9251eb223104aea89f293c3f4074ca700fe690e645617326b859da3e93c3
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 27, 2021
…funds.py

38040c3 [tests] Remove accounts from wallet_importprunedfunds.py (John Newbery)

Pull request description:

  This was split from bitcoin#13075 to not block review/merge of that PR.

Tree-SHA512: 631d7139ed2bda5222ec395cc75720261e2e1f741dba04723d09fe04ef6cf92222a3679d886026ec33e2db2d1e2fa1a0f36c2451581d0f733a9939a98c7118ab
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 28, 2021
…funds.py

38040c3 [tests] Remove accounts from wallet_importprunedfunds.py (John Newbery)

Pull request description:

  This was split from bitcoin#13075 to not block review/merge of that PR.

Tree-SHA512: 631d7139ed2bda5222ec395cc75720261e2e1f741dba04723d09fe04ef6cf92222a3679d886026ec33e2db2d1e2fa1a0f36c2451581d0f733a9939a98c7118ab
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 28, 2021
…funds.py

38040c3 [tests] Remove accounts from wallet_importprunedfunds.py (John Newbery)

Pull request description:

  This was split from bitcoin#13075 to not block review/merge of that PR.

Tree-SHA512: 631d7139ed2bda5222ec395cc75720261e2e1f741dba04723d09fe04ef6cf92222a3679d886026ec33e2db2d1e2fa1a0f36c2451581d0f733a9939a98c7118ab
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 28, 2021
…funds.py

38040c3 [tests] Remove accounts from wallet_importprunedfunds.py (John Newbery)

Pull request description:

  This was split from bitcoin#13075 to not block review/merge of that PR.

Tree-SHA512: 631d7139ed2bda5222ec395cc75720261e2e1f741dba04723d09fe04ef6cf92222a3679d886026ec33e2db2d1e2fa1a0f36c2451581d0f733a9939a98c7118ab
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 28, 2021
…funds.py

38040c3 [tests] Remove accounts from wallet_importprunedfunds.py (John Newbery)

Pull request description:

  This was split from bitcoin#13075 to not block review/merge of that PR.

Tree-SHA512: 631d7139ed2bda5222ec395cc75720261e2e1f741dba04723d09fe04ef6cf92222a3679d886026ec33e2db2d1e2fa1a0f36c2451581d0f733a9939a98c7118ab
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 29, 2021
…funds.py

38040c3 [tests] Remove accounts from wallet_importprunedfunds.py (John Newbery)

Pull request description:

  This was split from bitcoin#13075 to not block review/merge of that PR.

Tree-SHA512: 631d7139ed2bda5222ec395cc75720261e2e1f741dba04723d09fe04ef6cf92222a3679d886026ec33e2db2d1e2fa1a0f36c2451581d0f733a9939a98c7118ab
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request Aug 7, 2021
…ctions by label

da427db Rename ListTransactions filter variable (Russell Yanofsky)
65b740f [wallet] Restore ability to list incoming transactions by label (Russell Yanofsky)

Pull request description:

  This change partially reverts bitcoin#13075 and bitcoin#14023.

  Fixes bitcoin#14382

Tree-SHA512: 8c4e56104b3a45784cdc06bae8e5facdfff04fe3545b63a35e0ec2e440a41b79d84833ca4c4e728d8af7ebb8a519303a9eda7bee4bbfb92bd50c58587a33eb30
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants