@@ -139,10 +139,10 @@ def test_create_wallet_random_full(self, daemon: MoneroDaemonRpc) -> None:
139139 assert wallet .get_height () == 1
140140 assert wallet .get_restore_height () >= 0
141141
142- # cannot get daemon chain height
142+ # cannot get daemon chain height: wallet2 masks errors from untrusted daemons
143143 with pytest .raises (Exception ) as exc_info :
144144 wallet .get_daemon_height ()
145- assert str (exc_info .value ) == "Wallet is not connected to daemon"
145+ assert str (exc_info .value ) == "daemon error "
146146
147147 # set daemon and check chain height
148148 wallet .set_daemon_connection (daemon .get_rpc_connection ())
@@ -197,9 +197,7 @@ def test_create_wallet_from_seed_full(self, daemon: MoneroDaemonRpc) -> None:
197197 assert wallet .is_synced () is False
198198 assert wallet .get_height () == 1
199199 assert wallet .get_restore_height () == 0
200- with pytest .raises (Exception ) as exc_info :
201- wallet .start_syncing ()
202- WalletErrorUtils .test_wallet_is_not_connected_error (exc_info .value )
200+ wallet .start_syncing () # succeeds while offline, syncing when a daemon becomes reachable
203201
204202 wallet .close ()
205203
@@ -458,9 +456,7 @@ def test_start_stop_syncing(self, daemon: MoneroDaemonRpc) -> None:
458456 assert len (wallet .get_seed ()) > 0
459457 assert wallet .get_height () == 1
460458 assert wallet .get_balance () == 0
461- with pytest .raises (Exception ) as exc_info :
462- wallet .start_syncing ()
463- WalletErrorUtils .test_wallet_is_not_connected_error (exc_info .value )
459+ wallet .start_syncing () # succeeds while offline, syncing when a daemon becomes reachable
464460 finally :
465461 wallet .close ()
466462
0 commit comments