Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ironfish): Fix unlock hanging in memory client CLI #5392

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

rohanjadvani
Copy link
Member

Summary

When unlocking a wallet without a running node (i.e. using the rpc memory client), the process will hang until the timeout to re-lock the wallet is called (by default, this is 24h). There are several ways to address this issue:

  • Don't enqueue a timeout if unlocking via the UI utility in the CLI. This is not ideal, because if you have a running node, you may just leave it unlocked indefinitely. We can add further logic to prevent this probably.
  • Remove the utility to unlock the wallet, but that ruins UX a bit.

This PR does several things:

  • Implement the close method for the memory client. This did nothing before, but now shuts down the node connection
  • Destroy the master key and clear any timeouts before checking if the wallet is started.

Testing Plan

Run CLI commands

Documentation

Does this change require any updates to the Iron Fish Docs (ex. the RPC API
Reference
)? If yes, link a
related documentation pull request for the website.

[ ] Yes

Breaking Change

Is this a breaking change? If yes, add notes below on why this is breaking and label it with breaking-change-rpc or breaking-change-sdk.

[ ] Yes

@rohanjadvani rohanjadvani self-assigned this Sep 19, 2024
@rohanjadvani rohanjadvani marked this pull request as ready for review September 19, 2024 19:30
@rohanjadvani rohanjadvani requested a review from a team as a code owner September 19, 2024 19:30
@rohanjadvani rohanjadvani merged commit 6fbfd31 into staging Sep 19, 2024
12 checks passed
@rohanjadvani rohanjadvani deleted the rohan/fix-unlock-hanging branch September 19, 2024 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants