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(sdk)!: don't return Arc in SdkBuilder #1838

Merged
merged 4 commits into from
May 7, 2024

Conversation

lklimek
Copy link
Contributor

@lklimek lklimek commented May 7, 2024

Issue being fixed or feature implemented

Based on team's feedback, it's not a good idea to return Arc from SdkBuilder::build().

What was done?

Refactored the code to:

  • return Sdk from SdkBuilder::build()
  • implement Clone on Sdk and make Sdk internally thread-safe

Accompanying PR: dashpay/rs-platform-explorer#48

How Has This Been Tested?

GHA

Breaking Changes

SdkBuilder::build() now returns Sdk instead of Arc.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

PlatformVersion::set_current(self.version);

let sdk= match self.addresses {
let sdk= match self.addresses {
Copy link
Contributor

Choose a reason for hiding this comment

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

just a bit of formatting

@lklimek lklimek requested a review from fominok May 7, 2024 09:37
fominok
fominok previously approved these changes May 7, 2024
@QuantumExplorer QuantumExplorer merged commit 63d06f6 into v1.0-dev May 7, 2024
29 checks passed
@QuantumExplorer QuantumExplorer deleted the refactor/rs-sdk-no-arc branch May 7, 2024 22:23
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