From b00e1b63318af85bceb803901f19d8f039b90ef9 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Fri, 17 Sep 2021 01:08:41 +0300 Subject: [PATCH] Merge #14023: Remove accounts rpcs bb08423d5ca866d4a139a3b57ff110d818d08b32 [doc] Add release notes for 'account' API removal (John Newbery) 1f4b865e57b4567270b1586bb1f348ab9106485d [wallet] Re-sort wallet RPC commands (John Newbery) f0dc850bf698f7377797d7d68365d4fc79b0221c [wallet] Remove wallet account RPCs (John Newbery) c410f415758913c933ad6c71cf50227cc85aa385 [tests] Remove wallet accounts test (John Newbery) Pull request description: This is the first part of #13825. It simply removes the RPC methods and tests. #13825 touches lots of files and will require frequent rebasing. Breaking it down for easier reviewing and fewer rebases. Tree-SHA512: d29af8e7a035e4484e6b9bb56cb86592be0ec112d8ba4ce19c15d15366ff3086e89e99fca26b90c9d66f6d3e06894486d0f29948df0bb7dcb1e2c49c6887a85a --- doc/release-notes-14023.md | 8 + src/Makefile.test.include | 1 - src/rpc/client.cpp | 14 - src/wallet/rpcdump.cpp | 2 +- src/wallet/rpcwallet.cpp | 791 ++++----------------------- src/wallet/test/accounting_tests.cpp | 137 ----- src/wallet/wallet.h | 2 +- test/functional/rpc_deprecated.py | 80 +-- test/functional/wallet_labels.py | 123 +---- 9 files changed, 124 insertions(+), 1034 deletions(-) create mode 100644 doc/release-notes-14023.md delete mode 100644 src/wallet/test/accounting_tests.cpp diff --git a/doc/release-notes-14023.md b/doc/release-notes-14023.md new file mode 100644 index 0000000000..b23c11268b --- /dev/null +++ b/doc/release-notes-14023.md @@ -0,0 +1,8 @@ +Accout API removed +------------------ + +The 'account' API was deprecated in v0.17 and has been fully removed in v0.18. +The 'label' API was introduced in v0.17 as a replacement for accounts. + +See the release notes from v0.17 for a full description of the changes from the +'account' API to the 'label' API. diff --git a/src/Makefile.test.include b/src/Makefile.test.include index 8a6ce2d520..cac31bb6c4 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -196,7 +196,6 @@ BITCOIN_TESTS =\ if ENABLE_WALLET BITCOIN_TESTS += \ wallet/test/coinjoin_tests.cpp \ - wallet/test/accounting_tests.cpp \ wallet/test/db_tests.cpp \ wallet/test/psbt_wallet_tests.cpp \ wallet/test/wallet_tests.cpp \ diff --git a/src/rpc/client.cpp b/src/rpc/client.cpp index b5e5ea6553..0bb8ea01d2 100644 --- a/src/rpc/client.cpp +++ b/src/rpc/client.cpp @@ -44,8 +44,6 @@ static const CRPCConvertParam vRPCConvertParams[] = { "settxfee", 0, "amount" }, { "getreceivedbyaddress", 1, "minconf" }, { "getreceivedbyaddress", 2, "addlocked" }, - { "getreceivedbyaccount", 1, "minconf" }, - { "getreceivedbyaccount", 2, "addlocked" }, { "getreceivedbylabel", 1, "minconf" }, { "getreceivedbylabel", 2, "addlocked" }, { "listaddressbalances", 0, "minamount" }, @@ -53,10 +51,6 @@ static const CRPCConvertParam vRPCConvertParams[] = { "listreceivedbyaddress", 1, "addlocked" }, { "listreceivedbyaddress", 2, "include_empty" }, { "listreceivedbyaddress", 3, "include_watchonly" }, - { "listreceivedbyaccount", 0, "minconf" }, - { "listreceivedbyaccount", 1, "addlocked" }, - { "listreceivedbyaccount", 2, "include_empty" }, - { "listreceivedbyaccount", 3, "include_watchonly" }, { "listreceivedbylabel", 0, "minconf" }, { "listreceivedbylabel", 1, "addlocked" }, { "listreceivedbylabel", 2, "include_empty" }, @@ -72,17 +66,9 @@ static const CRPCConvertParam vRPCConvertParams[] = { "waitforblockheight", 1, "timeout" }, { "waitforblock", 1, "timeout" }, { "waitfornewblock", 0, "timeout" }, - { "move", 2, "amount" }, - { "move", 3, "minconf" }, - { "sendfrom", 2, "amount" }, - { "sendfrom", 3, "minconf" }, - { "sendfrom", 4, "addlocked" }, { "listtransactions", 1, "count" }, { "listtransactions", 2, "skip" }, { "listtransactions", 3, "include_watchonly" }, - { "listaccounts", 0, "minconf" }, - { "listaccounts", 1, "addlocked" }, - { "listaccounts", 2, "include_watchonly" }, { "walletpassphrase", 1, "timeout" }, { "walletpassphrase", 2, "mixingonly" }, { "getblocktemplate", 0, "template_request" }, diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index bbcfa5d9e3..a4dba8af8d 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -1353,7 +1353,7 @@ UniValue importmulti(const JSONRPCRequest& mainRequest) " \"keys\": [\"\", ... ] , (array, optional) Array of strings giving private keys whose corresponding public keys must occur in the output or redeemscript\n" " \"internal\": , (boolean, optional, default: false) Stating whether matching outputs should be treated as not incoming payments aka change\n" " \"watchonly\": , (boolean, optional, default: false) Stating whether matching outputs should be considered watched even when they're not spendable, only allowed if keys are empty\n" - " \"label\":