mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
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)
This commit is contained in:
parent
0cbf5571d3
commit
1d3657afb5
3 changed files with 34 additions and 6 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue