What changed, and why it matters
This commit fixes a test script used to verify Monero's 'cold signing' feature, where transactions are signed on an offline device. The change only adjusts how the test creates and checks wallet accounts. There is no change to Monero's actual wallet, cryptography, or network code, so it does not affect real users or funds.
No security action required. This is a test-only fix and can be treated as routine maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies tests/functional_tests/cold_signing.py. Previously the test created a new account on the hot wallet, took its address, and then assumed that creating a single new account on an observer wallet would produce the same address. That assumption fails if the new account is not at index 0. The fix stores the created account object (destination_account), retrieves its account_index, and then creates the same number of accounts on the observer before comparing addresses at the matching index. This is purely a test-logic correction.
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.