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

feat(wallet-ffi): adds FFI wallet_get_utxos() and test_wallet_get_utxos() #4180

Merged
merged 6 commits into from Jun 10, 2022

Conversation

agubarev
Copy link
Contributor

@agubarev agubarev commented Jun 10, 2022

Motivation and Context

To allow client app (mobile) to get a paginated list of unspent outputs, filtered by a minimum value threshold.

How Has This Been Tested?

unit test

@sdbondi sdbondi changed the title added FFI wallet_get_utxos() and test_wallet_get_utxos() feat(wallet-ffi): adds FFI wallet_get_utxos() and test_wallet_get_utxos() Jun 10, 2022
Copy link
Member

@sdbondi sdbondi left a comment

Choose a reason for hiding this comment

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

Nice looks good - just one change RE the runtime.
Please also add details to the PR description

dust_threshold
);

let rt = match Runtime::new() {
Copy link
Member

Choose a reason for hiding this comment

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

The wallet already has a runtime (it's an anti-pattern to create multiple runtimes)

wallet.runtime

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, that's right, removed new runtime initialization and using:

    match (*wallet)
        .runtime
        .block_on((*wallet).wallet.output_manager_service.get_unspent_outputs())
    {
        Ok(mut unblinded_outputs) => {

like in other places, thanks!

@stringhandler stringhandler merged commit 9770402 into tari-project:testnet-dibbler Jun 10, 2022
sdbondi added a commit to sdbondi/tari that referenced this pull request Jun 22, 2022
* testnet-dibbler:
  v0.32.5
  chore: update toolchain and fix clippy (tari-project#4212)
  feat(wallet_ffi): wallet_get_utxos() (tari-project#4209)
  chore: bump lmdb-sys dependency (tari-project#4195)
  chore(deps): upgrade randomx (tari-project#4196)
  Bump croaring to 0.5.2 - improve cross-compile in docker
  bug: remove deprecated tauri config variable (tari-project#4194)
  feat: generate wallet ffi header file automatically (tari-project#4183)
  v0.32.4
  feat(wallet-ffi): adds FFI wallet_get_utxos() and test_wallet_get_utxos() (tari-project#4180)
sdbondi added a commit to sdbondi/tari that referenced this pull request Jun 22, 2022
* testnet-dibbler:
  v0.32.5
  chore: update toolchain and fix clippy (tari-project#4212)
  feat(wallet_ffi): wallet_get_utxos() (tari-project#4209)
  chore: bump lmdb-sys dependency (tari-project#4195)
  chore(deps): upgrade randomx (tari-project#4196)
  Bump croaring to 0.5.2 - improve cross-compile in docker
  bug: remove deprecated tauri config variable (tari-project#4194)
  feat: generate wallet ffi header file automatically (tari-project#4183)
  v0.32.4
  feat(wallet-ffi): adds FFI wallet_get_utxos() and test_wallet_get_utxos() (tari-project#4180)
sdbondi added a commit to sdbondi/tari that referenced this pull request Jun 22, 2022
* development:
  fix clippies
  remove tari_core_from cbindgen build
  feat(miner): friendlier miner output (tari-project#4219)
  v0.32.5
  chore: update toolchain and fix clippy (tari-project#4212)
  feat(wallet_ffi): wallet_get_utxos() (tari-project#4209)
  chore: bump lmdb-sys dependency (tari-project#4195)
  chore(deps): upgrade randomx (tari-project#4196)
  Bump croaring to 0.5.2 - improve cross-compile in docker
  bug: remove deprecated tauri config variable (tari-project#4194)
  feat: generate wallet ffi header file automatically (tari-project#4183)
  v0.32.4
  feat(wallet-ffi): adds FFI wallet_get_utxos() and test_wallet_get_utxos() (tari-project#4180)
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.

None yet

3 participants