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(rpc/client): stop overwriting existing clients #2361

Merged
merged 3 commits into from
Jun 14, 2023
Merged

Conversation

distractedm1nd
Copy link
Collaborator

While working on #2356 I uncovered a bug:

When using the client.NewClient constructor, it uses a global static struct to set the modules. This led to clients overwriting each other when multiple are initialized.

@distractedm1nd distractedm1nd added kind:fix Attached to bug-fixing PRs area:api Related to celestia-node API labels Jun 13, 2023
@distractedm1nd distractedm1nd self-assigned this Jun 13, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jun 13, 2023

Codecov Report

Merging #2361 (7d48312) into main (c41738a) will increase coverage by 0.04%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2361      +/-   ##
==========================================
+ Coverage   50.84%   50.88%   +0.04%     
==========================================
  Files         154      154              
  Lines        9746     9746              
==========================================
+ Hits         4955     4959       +4     
+ Misses       4355     4351       -4     
  Partials      436      436              

see 3 files with indirect coverage changes

api/rpc/client/client.go Show resolved Hide resolved
@distractedm1nd distractedm1nd enabled auto-merge (squash) June 14, 2023 07:50
@distractedm1nd distractedm1nd merged commit c157db6 into main Jun 14, 2023
@distractedm1nd distractedm1nd deleted the multi-client branch June 14, 2023 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:api Related to celestia-node API kind:fix Attached to bug-fixing PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants