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

Refactor Tokio runtime out of wallet container #2213

Conversation

philipr-za
Copy link
Contributor

Description

Currently the wallet container in LibWallet holds the tokio runtime required by the wallet. This was done to enable the Wallet FFI library to function as the FFI wallet object needed to hold onto the runtime or else it would be dropped. However it is only needed for the FFI instance of the wallet and interferes with the standard way of managing the runtime in the other binary applications.

This PR removes the runtime from the wallet container in tari_wallet and creates a FFI specific TariWallet container which holds onto the runtime instance just for the FFI library.

How Has This Been Tested?

Existing tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Feature refactor (No new feature or functional changes, but performance or technical debt improvements)
  • New Tests
  • Documentation

Checklist:

  • I'm merging against the development branch.
  • I ran cargo-fmt --all before pushing.
  • I have squashed my commits into a single commit.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

Currently the wallet container in LibWallet holds the tokio runtime required by the wallet. This was done to enable the Wallet FFI library to function as the FFI wallet object needed to hold onto the runtime or else it would be dropped. However it is only needed for the FFI instance of the wallet and interferes with the standard way of managing the runtime in the other binary applications.

This PR removes the runtime from the wallet container in `tari_wallet` and creates a FFI specific TariWallet container which holds onto the runtime instance just for the FFI library.
@philipr-za philipr-za force-pushed the philip-refactor-wallet-container branch from a0d5808 to a6fe1a2 Compare September 10, 2020 14:22
Copy link
Collaborator

@stringhandler stringhandler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much neater. Nice!

@stringhandler stringhandler merged commit 69c4b2b into tari-project:development Sep 15, 2020
stringhandler added a commit that referenced this pull request Sep 18, 2020
Major Fixes since v0.5.4
* Many fixes and updates to tari_merge_mining_proxy
* Implement transaction negotiation message resending in the wallet (#2161)

Minor Fixes
* Added basic RPC interface for DHT (#2188)
* Refactor Tokio runtime out of wallet container (#2213)
* Add period stats UI call (#2189)
* Protect against possible panics in header/horizon sync (#2219)
* Fix coinbase vulnerability (#2143)
* Added a user configurable chain monitoring timeout (#2202)
* Implement LMDB automatic resizing
* Add `is_synced` flag to BaseNodeServiceResponse & update UTXO validator
@philipr-za philipr-za deleted the philip-refactor-wallet-container branch June 8, 2021 13:00
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