aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2022-08-18 07:14:45 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2022-08-18 19:29:03 +0000
commita0985044d926383fba0272cc08617ce8b3f56316 (patch)
tree04739d330cdd3ff88291ae9d8f35d572b6a4632e /tests
parentallow exporting outputs in chunks (diff)
downloadmonero-a0985044d926383fba0272cc08617ce8b3f56316.tar.xz
wallet2: better test on whether to allow output import
Being offline is not a good enough heuristic, so we keep track of whether the wallet ever refreshed from a daemon, which is a lot better, and probably the best we can do without manual user designation (which would break existing cold wallet setups till the user designates those wallets)
Diffstat (limited to 'tests')
-rwxr-xr-xtests/functional_tests/cold_signing.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/functional_tests/cold_signing.py b/tests/functional_tests/cold_signing.py
index 983cd9029..bd48671a2 100755
--- a/tests/functional_tests/cold_signing.py
+++ b/tests/functional_tests/cold_signing.py
@@ -109,6 +109,15 @@ class ColdSigningTest():
num_outputs -= 1
count = 1 + int(random.random() * 5)
res = self.hot_wallet.export_outputs(all = True, start = start, count = count)
+
+ # the hot wallet cannot import outputs
+ ok = False
+ try:
+ self.hot_wallet.import_outputs(res.outputs_data_hex)
+ except:
+ ok = True
+ assert ok
+
try:
self.cold_wallet.import_outputs(res.outputs_data_hex)
except Exception as e: