You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a wallet via the API, we also start a restoration worker in charge of keeping the wallet in sync with the chain. There's one dedicated worker per wallet, and they're fairly resilient to network issues.
However, when restarting a wallet using an existing database that already contains a wallet, not restoration worker is started. Though, the wallet exist in DB and can't be recreated for instance.
Steps to Reproduce
$ cardano-wallet launch --state-dir .state
$ cardano-wallet wallet create ...
SIGINT or CTRL-C on the launcher
$ cardano-wallet launch --state-dir .state
Expected behavior
We should see log activity for a restoration worker keeping the wallet in sync.
Actual behavior
Nothing happen, the wallet exists in the DB but no restoration worker in background.
Add an integration tests which does the following steps (see LauncherSpec)
Start a wallet server (on an empty state, with persistence)
Create a new wallet
Immediately kill the wallet server
Re-start a wallet server, using the same database file
Expect the previous wallet to exist and eventually be restored.
Note that the test is only a best-effort and will sometimes give false positive (but shouldn't give any false negative!). This is because we are running the test on a fresh new blockchain so, depending on when the restoration kicks in, it might have time to restore the wallet before we even kill the server (:rocket:). This happens fairly rarely in practice, and shouldn't give any false alarm anyway.
The text was updated successfully, but these errors were encountered:
Context
When creating a wallet via the API, we also start a restoration worker in charge of keeping the wallet in sync with the chain. There's one dedicated worker per wallet, and they're fairly resilient to network issues.
However, when restarting a wallet using an existing database that already contains a wallet, not restoration worker is started. Though, the wallet exist in DB and can't be recreated for instance.
Steps to Reproduce
$ cardano-wallet launch --state-dir .state
$ cardano-wallet wallet create ...
$ cardano-wallet launch --state-dir .state
Expected behavior
We should see log activity for a restoration worker keeping the wallet in sync.
Actual behavior
Nothing happen, the wallet exists in the DB but no restoration worker in background.
Resolution Plan
PR
master
QA
Add an integration tests which does the following steps (see LauncherSpec)
Note that the test is only a best-effort and will sometimes give false positive (but shouldn't give any false negative!). This is because we are running the test on a fresh new blockchain so, depending on when the restoration kicks in, it might have time to restore the wallet before we even kill the server (:rocket:). This happens fairly rarely in practice, and shouldn't give any false alarm anyway.
The text was updated successfully, but these errors were encountered: