v30.3-roots.1 · Commit 29: [PATCH 29/68] docs(release): prepare v30.3-roots.1 candidate notes
ci/test/test_wallet_privacy_contract.py
Before: ci/test/test_wallet_privacy_contract.py · After: ci/test/test_wallet_privacy_contract.py
File metadata
index 0c8095f97605744103294ce4e4aae923774372b5..5863f58e96076eadfcc99536feabf82b9e60f855 100644
Download original patch · Release notes
Diff rows 1–45 of 45. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.
ci/test/test_wallet_privacy_contract.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
"""Static contracts for transient sweep-key handling and cancellation."""
|
|
2
|
+
"""Static contracts for wallet privacy behavior and documentation."""
|
|
3
3
|
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
import unittest
|
|
@@ -26,6 +26,39 @@ class WalletPrivacyContractTest(unittest.TestCase):
|
|
|
26
26
|
self.assertLess(begin, broadcast)
|
|
27
27
|
self.assertIn("authorization.IsCancelled()", spend)
|
|
28
28
|
|
|
29
|
+
def test_coin_control_documentation_matches_its_row_filter(self):
|
|
30
|
+
documentation = (ROOT / "doc/wallet-privacy.md").read_text(encoding="utf-8")
|
|
31
|
+
wallet_interface = (ROOT / "src/wallet/interfaces.cpp").read_text(encoding="utf-8")
|
|
32
|
+
wallet_spend = (ROOT / "src/wallet/spend.cpp").read_text(encoding="utf-8")
|
|
33
|
+
coin_control = (ROOT / "src/wallet/coincontrol.h").read_text(encoding="utf-8")
|
|
34
|
+
|
|
35
|
+
self.assertIn("starts with the wallet's normal available-output list", documentation)
|
|
36
|
+
self.assertIn("Locked\n outputs remain visible", documentation)
|
|
37
|
+
self.assertIn("Unsafe and immature outputs are not added merely to show a status", documentation)
|
|
38
|
+
self.assertIn("not an\n inventory of unavailable outputs", documentation)
|
|
39
|
+
self.assertNotIn("Locked, unsafe,\n immature, or unavailable inputs are reported", documentation)
|
|
40
|
+
|
|
41
|
+
list_coins = wallet_spend[wallet_spend.index("ListCoins(const CWallet& wallet)"):]
|
|
42
|
+
self.assertIn("coins_params.skip_locked = false;", list_coins)
|
|
43
|
+
self.assertNotIn("coins_params.include_immature_coinbase = true;", list_coins)
|
|
44
|
+
self.assertIn("bool m_include_unsafe_inputs = false;", coin_control)
|
|
45
|
+
self.assertIn("for (const auto& entry : ListCoins(*m_wallet))", wallet_interface)
|
|
46
|
+
|
|
47
|
+
def test_candidate_documents_release_state_and_verification(self):
|
|
48
|
+
catalog = (ROOT / "doc/roots-features.md").read_text(encoding="utf-8")
|
|
49
|
+
guide = (ROOT / "doc/wallet-privacy.md").read_text(encoding="utf-8")
|
|
50
|
+
release_notes = (ROOT / "doc/release-notes.md").read_text(encoding="utf-8")
|
|
51
|
+
|
|
52
|
+
for document in (catalog, guide, release_notes):
|
|
53
|
+
self.assertIn("v30.3-roots.1", document)
|
|
54
|
+
self.assertIn("candidate", document)
|
|
55
|
+
self.assertIn("candidate documentation for the intended `v30.3-roots.1` release", release_notes)
|
|
56
|
+
self.assertNotIn("v30.3-roots.1 is now available", release_notes)
|
|
57
|
+
self.assertNotIn("v30.3-roots.1 has been released", release_notes)
|
|
58
|
+
self.assertIn("bitcoin-cli help sweepprivkeys", guide)
|
|
59
|
+
self.assertIn("bitcoin-cli --version", guide)
|
|
60
|
+
self.assertIn("no wallet-format migration", release_notes)
|
|
61
|
+
|
|
29
62
|
|
|
30
63
|
if __name__ == "__main__":
|
|
31
64
|
unittest.main()
|