{
 "number": 36333,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/36333",
 "title": "wallet: Delete `removeprunedfunds` and delete transaction delete code",
 "author": "davidgumberg",
 "author_association": "MEMBER",
 "created_at": "2026-09-25T00:54:03Z",
 "updated_at": "2026-10-21T20:12:43Z",
 "description_hash": "f504f6a22445e7b7",
 "age_days": 38,
 "draft": false,
 "labels": [
  "Wallet",
  "Needs rebase"
 ],
 "milestone": "33.0",
 "base": "master",
 "head_sha": "360625ff4e67205d4d1714e00aedbf8be45bb18d",
 "head_ref": "2026-09-24-removetxremoval",
 "head_repo": "davidgumberg/bitcoin",
 "head_history": [
  {
   "t": "2026-09-25T00:58:10Z",
   "sha": "34f95146340bfdc138436db49473c2ee3cb1c5af"
  },
  {
   "t": "2026-10-09T01:05:25Z",
   "sha": "153ad19eebb9d10c3f6b0b6b98f1f5b7dca56ba5"
  },
  {
   "t": "2026-10-09T01:16:36Z",
   "sha": "360625ff4e67205d4d1714e00aedbf8be45bb18d"
  }
 ],
 "additions": 7,
 "deletions": 230,
 "changed_files": 11,
 "commit_count": 4,
 "size_bucket": "M",
 "mergeable_state": "dirty",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {
    "ack": [
     {
      "login": "pablomartin4btc",
      "url": "https://github.com/bitcoin/bitcoin/pull/36333#pullrequestreview-5605281495"
     }
    ],
    "concept_ack": [
     {
      "login": "w0xlt",
      "url": "https://github.com/bitcoin/bitcoin/pull/36333#issuecomment-5902286440"
     }
    ]
   },
   "conflicts": []
  }
 },
 "acks_parsed": {
  "w0xlt": {
   "kind": "concept_ack",
   "hash": null,
   "t": "2026-09-30T01:30:48Z",
   "stale": false
  },
  "pablomartin4btc": {
   "kind": "ack",
   "hash": "360625ff4e67205d4d1714e00aedbf8be45bb18d",
   "t": "2026-10-21T20:12:39Z",
   "stale": false
  }
 },
 "acks_tally": {
  "ack": 1,
  "stale_ack": 0,
  "concept_ack": 1,
  "approach_ack": 0,
  "nack": 0,
  "concept_nack": 0,
  "approach_nack": 0
 },
 "reviews": {
  "approved": 0,
  "changes_requested": 0,
  "distinct_reviewers": [
   "crooksmadison69-cmd",
   "pablomartin4btc",
   "w0xlt"
  ]
 },
 "signals": {
  "needs_rebase": true,
  "ci_failed": false,
  "mergeable_state": "dirty",
  "last_author_activity": "2026-10-09T01:16:36Z",
  "last_reviewer_activity": "2026-10-21T20:12:39Z",
  "last_reviewer": "pablomartin4btc",
  "author_silent_days": 23,
  "waiting_on_author_days": 11,
  "days_since_update": 11
 },
 "refs": {
  "mentioned": [
   21647
  ],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [
   {
    "number": 21647,
    "type": "issue",
    "state": "closed",
    "merged": false,
    "merged_at": null,
    "title": "RPC importprunedfunds doesn't allow importing spending txs, only receiving txs"
   }
  ],
  "conflicts": []
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [
  "doc/release-notes-removeprunedfundsremoval.md",
  "src/wallet/rpc/wallet.cpp",
  "src/wallet/wallet.cpp",
  "test/functional/rpc_deprecated.py",
  "test/functional/wallet_importprunedfunds.py"
 ],
 "body": "Deprecated in v32 (https://github.com/bitcoin/bitcoin/pull/35605), this deletes the useless and harmful `removeprunedfunds` RPC.\n\nIt also removes deleting of watchonly transactions from the not-watchonly migrated wallet, which in theory we should clean up, but in practice this does nothing for the user, the only observable change is that if the user knows the txid they can do `gettransaction` and the migrated wallet will return the transaction information even though it does not have keys for the transaction, AFAICT for both GUI and RPC having irrelevant transactions inside of wallet is harmless and does not affect the output of anything, since most stuff is gated behind `IsMine()` anyways.\n\nRemoving both the RPC and the deletion of watchonly tx'es allows deleting the logic for transaction removal and the associated tests.\n\n_LLM Disclosure: Not used to write this PR or PR description, but I recently replaced clang on my machine with gemma-4-26B directly generating machine code._",
 "commits": [
  {
   "sha": "045a0c0c58a9852c167d34695fadbfcb6f84ef87",
   "date": "2026-10-09T01:16:25Z",
   "message": "wallet: rpc: Delete removeprunedfunds"
  },
  {
   "sha": "b43647960e7e98c40f3c671209d9041ffddda811",
   "date": "2026-10-09T01:16:25Z",
   "message": "wallet: migration: don't prune unnecessary tx'es from DB\n\nWhile this is nice in theory, it accomplishes very little in practice\nfor the user, and deleting this allows removal of all transaction\ndeleting logic."
  },
  {
   "sha": "c7dfd82edb4d6beb6257c08ffe3459fd8b6cf002",
   "date": "2026-10-09T01:16:25Z",
   "message": "wallet: qa: Prune unused functions for tx removal\n\nThere is never a good reason to delete tx data from a wallet, so delete\nthese functions."
  },
  {
   "sha": "360625ff4e67205d4d1714e00aedbf8be45bb18d",
   "date": "2026-10-09T01:16:25Z",
   "message": "doc: release note for removeprunedfunds rpc deletion"
  }
 ],
 "timeline": [
  {
   "t": "2026-09-25T00:58:10Z",
   "kind": "force_push",
   "who": "davidgumberg",
   "commit": "34f95146340bfdc138436db49473c2ee3cb1c5af",
   "id": "push:34f95146340bfdc138436db49473c2ee3cb1c5af"
  },
  {
   "t": "2026-09-25T01:17:25Z",
   "kind": "review_comment",
   "who": "crooksmadison69-cmd",
   "assoc": "NONE",
   "path": "src/wallet/rpc/wallet.cpp",
   "commit": "360625ff4e67205d4d1714e00aedbf8be45bb18d",
   "in_reply_to": null,
   "text": "Gettransaction",
   "id": "rc:4100099498",
   "url": "https://github.com/bitcoin/bitcoin/pull/36333#discussion_r4100099498",
   "hash": "a42e2757328708a2",
   "edited": "2026-09-25T01:18:53Z"
  },
  {
   "t": "2026-09-30T01:30:48Z",
   "kind": "comment",
   "who": "w0xlt",
   "assoc": "CONTRIBUTOR",
   "text": "Concept ACK",
   "id": "c:5902286440",
   "url": "https://github.com/bitcoin/bitcoin/pull/36333#issuecomment-5902286440",
   "hash": "e8334cc43879b73c",
   "edited": null
  },
  {
   "t": "2026-10-09T01:05:25Z",
   "kind": "force_push",
   "who": "davidgumberg",
   "commit": "153ad19eebb9d10c3f6b0b6b98f1f5b7dca56ba5",
   "id": "push:153ad19eebb9d10c3f6b0b6b98f1f5b7dca56ba5"
  },
  {
   "t": "2026-10-09T01:05:38Z",
   "kind": "comment",
   "who": "davidgumberg",
   "assoc": "MEMBER",
   "text": "Rebased to fix merge conflicts.",
   "id": "c:6072147990",
   "url": "https://github.com/bitcoin/bitcoin/pull/36333#issuecomment-6072147990",
   "hash": "f1aa61268ceaec4e",
   "edited": null
  },
  {
   "t": "2026-10-09T01:16:36Z",
   "kind": "force_push",
   "who": "davidgumberg",
   "commit": "360625ff4e67205d4d1714e00aedbf8be45bb18d",
   "id": "push:360625ff4e67205d4d1714e00aedbf8be45bb18d"
  },
  {
   "t": "2026-10-21T19:43:30Z",
   "kind": "review_comment",
   "who": "pablomartin4btc",
   "assoc": "MEMBER",
   "path": "src/wallet/wallet.cpp",
   "commit": "360625ff4e67205d4d1714e00aedbf8be45bb18d",
   "in_reply_to": null,
   "text": "Since these txs are no longer deleted, they stay in the migrated wallet. Besides `gettransaction`, they now count in `getwalletinfo`'s `txcount` and get rebroadcast by the spendable wallet if unconfirmed. Not a blocker, but maybe worth mentioning in the PR description/release note, and testing the new behavior in `wallet_migration.py` instead of only dropping the old assertions.\n\nnit: this is not outdated... perhaps it can be something like:\n\n```suggestion\n                // Nothing more to do if it does not belong to the migrated wallet\n```",
   "id": "rc:4341195658",
   "url": "https://github.com/bitcoin/bitcoin/pull/36333#discussion_r4341195658",
   "hash": "63010e355dea0a70",
   "edited": "2026-10-21T20:12:39Z"
  },
  {
   "t": "2026-10-21T20:00:18Z",
   "kind": "review_comment",
   "who": "pablomartin4btc",
   "assoc": "MEMBER",
   "path": "doc/release-notes-removeprunedfundsremoval.md",
   "commit": "360625ff4e67205d4d1714e00aedbf8be45bb18d",
   "in_reply_to": null,
   "text": "nit: according to the release notes [guidance](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#release-notes) this filename should be `release-notes-36333.md`. Also since we have \"New RPCs\" section, perhaps a \"Removed RPCs\" section would make this more noticeable than listing it as an update (feel free to ignore, as previous removals have gone under \"Updated RPCs\" or \"Wallet\"). Last thing, not sure if it's worth mentioning, but this also changes migration: watch-only txs are now kept in the migrated wallet (e.g. they're counted in `getwalletinfo`'s `txcount`).",
   "id": "rc:4341354916",
   "url": "https://github.com/bitcoin/bitcoin/pull/36333#discussion_r4341354916",
   "hash": "b29a78656d753511",
   "edited": "2026-10-21T20:12:39Z"
  },
  {
   "t": "2026-10-21T20:04:17Z",
   "kind": "review_comment",
   "who": "pablomartin4btc",
   "assoc": "MEMBER",
   "path": "test/functional/rpc_deprecated.py",
   "commit": "360625ff4e67205d4d1714e00aedbf8be45bb18d",
   "in_reply_to": null,
   "text": "nit: before the deprecation commit there were log lines here; restoring them would be cleaner.\n```suggestion\n        self.log.info(\"Tests for deprecated RPC methods (if any)\")\n        self.log.info(\"Currently no tests for deprecated RPC methods\")\n```",
   "id": "rc:4341391387",
   "url": "https://github.com/bitcoin/bitcoin/pull/36333#discussion_r4341391387",
   "hash": "0452d9d5a32aa52a",
   "edited": "2026-10-21T20:12:39Z"
  },
  {
   "t": "2026-10-21T20:11:42Z",
   "kind": "review_comment",
   "who": "pablomartin4btc",
   "assoc": "MEMBER",
   "path": "test/functional/wallet_importprunedfunds.py",
   "commit": "360625ff4e67205d4d1714e00aedbf8be45bb18d",
   "in_reply_to": null,
   "text": "nit: this block tests `importprunedfunds` for a spending tx with no wallet outputs (#21647, added in c2da52d366); it only used `removeprunedfunds` to take the tx out of the wallet first. Could it be kept by importing into a fresh wallet that has the key, instead of dropping the coverage?",
   "id": "rc:4341458605",
   "url": "https://github.com/bitcoin/bitcoin/pull/36333#discussion_r4341458605",
   "hash": "a20f47e92a6ebd54",
   "edited": "2026-10-21T20:12:39Z"
  },
  {
   "t": "2026-10-21T20:12:39Z",
   "kind": "review",
   "who": "pablomartin4btc",
   "assoc": "MEMBER",
   "state": "COMMENTED",
   "commit": "360625ff4e67205d4d1714e00aedbf8be45bb18d",
   "text": "cr ACK 360625ff4e67205d4d1714e00aedbf8be45bb18d\n\nChecked that nothing in the tree still refers to `removeprunedfunds`, `RemoveTxs` or `EraseTx`.\n\nLeft some inline nits, no blockers. Needs rebase.",
   "id": "r:5605281495",
   "url": "https://github.com/bitcoin/bitcoin/pull/36333#pullrequestreview-5605281495",
   "hash": "9a527297794710ec",
   "edited": null
  }
 ],
 "labels_log": [
  {
   "t": "2026-09-25T00:54:08Z",
   "action": "labeled",
   "label": "Wallet",
   "who": "DrahtBot"
  },
  {
   "t": "2026-09-25T00:59:41Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-09-25T02:02:49Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-09-26T00:49:39Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-10-09T01:17:57Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-10-09T01:24:32Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-10-09T02:39:53Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-10-13T02:13:17Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  }
 ],
 "state_log": [
  {
   "t": "2026-09-25T00:54:07Z",
   "kind": "renamed",
   "who": "DrahtBot",
   "from": "wallet: Delete `removeprunedfunds` and delete transaction delete code ",
   "to": "wallet: Delete `removeprunedfunds` and delete transaction delete code"
  },
  {
   "t": "2026-09-25T07:08:03Z",
   "kind": "milestoned",
   "who": "maflcko"
  }
 ],
 "text_chars": 3438,
 "text_tokens_estimate": 859,
 "changed_paths": [
  "doc/release-notes-removeprunedfundsremoval.md",
  "src/wallet/rpc/backup.cpp",
  "src/wallet/rpc/wallet.cpp",
  "src/wallet/test/wallet_tests.cpp",
  "src/wallet/wallet.cpp",
  "src/wallet/wallet.h",
  "src/wallet/walletdb.cpp",
  "src/wallet/walletdb.h",
  "test/functional/rpc_deprecated.py",
  "test/functional/wallet_importprunedfunds.py",
  "test/functional/wallet_migration.py"
 ],
 "files": [
  {
   "path": "doc/release-notes-removeprunedfundsremoval.md",
   "add": 5,
   "del": 0
  },
  {
   "path": "src/wallet/rpc/backup.cpp",
   "add": 0,
   "del": 39
  },
  {
   "path": "src/wallet/rpc/wallet.cpp",
   "add": 0,
   "del": 2
  },
  {
   "path": "src/wallet/test/wallet_tests.cpp",
   "add": 0,
   "del": 34
  },
  {
   "path": "src/wallet/wallet.cpp",
   "add": 0,
   "del": 70
  },
  {
   "path": "src/wallet/wallet.h",
   "add": 0,
   "del": 4
  },
  {
   "path": "src/wallet/walletdb.cpp",
   "add": 0,
   "del": 7
  },
  {
   "path": "src/wallet/walletdb.h",
   "add": 0,
   "del": 1
  },
  {
   "path": "test/functional/rpc_deprecated.py",
   "add": 1,
   "del": 13
  },
  {
   "path": "test/functional/wallet_importprunedfunds.py",
   "add": 1,
   "del": 56
  },
  {
   "path": "test/functional/wallet_migration.py",
   "add": 0,
   "del": 4
  }
 ],
 "test_lines": 109,
 "git": {
  "head": "360625ff4e67205d4d1714e00aedbf8be45bb18d",
  "head_matches_backup": true,
  "base": "acdb32693417c1b6596edfbdd19ab793c010d34f",
  "patch_id": "3dea53a8cd0d90a9",
  "commits": [
   {
    "sha": "045a0c0c58",
    "subject": "wallet: rpc: Delete removeprunedfunds",
    "files": 4,
    "add": 2,
    "del": 110
   },
   {
    "sha": "b43647960e",
    "subject": "wallet: migration: don't prune unnecessary tx'es from DB",
    "files": 2,
    "add": 0,
    "del": 13
   },
   {
    "sha": "c7dfd82edb",
    "subject": "wallet: qa: Prune unused functions for tx removal",
    "files": 5,
    "add": 0,
    "del": 107
   },
   {
    "sha": "360625ff4e",
    "subject": "doc: release note for removeprunedfunds rpc deletion",
    "files": 1,
    "add": 5,
    "del": 0
   }
  ],
  "patch_truncated": false
 },
 "patch_id": "3dea53a8cd0d90a9",
 "input_hash": "51716cc472ddb5b0",
 "extracted_at": "2026-11-02T01:09:49+00:00"
}