What changed, and why it matters
This commit fixes a test script used during automated testing of Monero's cold-signing feature. It does not change the actual Monero wallet or network code. The fix ensures the test creates the right number of accounts in an observer wallet before checking an address, so the test correctly verifies the intended behavior. There is no security vulnerability here.
No security action needed. This is a routine test-maintenance merge; ensure CI passes.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change is confined to tests/functional_tests/cold_signing.py. Previously, the test created one account in an observer wallet and asserted its address matched a destination address created in the hot wallet. However, if the hot wallet’s new account had a non-zero account_index, the observer wallet would be at a different account index, causing the assertion to compare the wrong addresses. The patch captures the destination account index and creates the corresponding number of accounts in the observer wallet before asserting the address at the correct index. This is a test-only correctness fix.
Changed components
tests/functional_tests/cold_signing.pyInspect captured patch +5 / −2
### tests/functional_tests/cold_signing.py
@@ -348,14 +348,17 @@ def incoming(account_index):
def self_transfer_to_other_account(self):
print("Self-spending to another account in a view-only wallet")
self.export_import(False)
- destination = self.hot_wallet.create_account().address
+ destination_account = self.hot_wallet.create_account()
+ destination = destination_account.address
assert self.cold_wallet.create_account().address == destination
observer = Wallet(idx = 1)
try: observer.close_wallet()
except: pass
observer.generate_from_keys(viewkey = self.cold_wallet.query_key("view_key").key, address = STANDARD_ADDRESS)
- assert observer.create_account().address == destination
+ for _ in range(destination_account.account_index):
+ observer.create_account()
+ assert observer.get_address(account_index = destination_account.account_index).address == destination
observer.refresh()
amount = 1000000000000Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.