tari-project / tari

The Tari protocol
https://tari.com
BSD 3-Clause "New" or "Revised" License
356 stars 220 forks source link

feat!: add context to ffi callbacks #6608

Closed SWvheerden closed 1 month ago

SWvheerden commented 1 month ago

Description

Adds c_void context pointer to all FFI callbacks Splits get address functions into interactive and one-sided

Motivation and Context

By adding a c_void pointer to the all callbacks, each callback can be identified by the context to know from what wallet the callback comes from. Identifying the callback becomes important if you are running more than one wallet and thus need to identify the calling wallet.

Allows the FFI to get both the interactive and one-sided addresses from the wallet.

Breaking Changes

Adds c_void context to all callbacks. Renames get_wallet_address to get_wallet_interactive_addess and adds get_wallet_one_sided_address

github-actions[bot] commented 1 month ago

Test Results (CI)

    3 files    129 suites   37m 7s :stopwatch: 1 326 tests 1 326 :white_check_mark: 0 :zzz: 0 :x: 3 976 runs  3 976 :white_check_mark: 0 :zzz: 0 :x:

Results for commit ff494bd7.

:recycle: This comment has been updated with latest results.

github-actions[bot] commented 1 month ago

Test Results (Integration tests)

36 tests  +36   36 :white_check_mark: +36   14m 57s :stopwatch: + 14m 57s 11 suites +11    0 :zzz: ± 0   2 files   + 2    0 :x: ± 0 

Results for commit ff494bd7. ± Comparison against base commit 332068f9.

:recycle: This comment has been updated with latest results.

SWvheerden commented 1 month ago

yeah its any pointer, but I dont think you can choose the wallet pointer in the way its constructed. As you need to provide the pointer before you get the wallet?