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

Add sleep for check_signature #3677

Merged
merged 1 commit into from
Apr 8, 2019

Conversation

sakridge
Copy link
Member

@sakridge sakridge commented Apr 8, 2019

Problem

check_signature loops at the fastest speed to check for signatures causing overhead on server and client. Also, it never exits which is a problem when you are talking to a server which may be down or unavailable.

Summary of Changes

Add sleep to loop and fixed number of iterations.

Fixes #

@codecov
Copy link

codecov bot commented Apr 8, 2019

Codecov Report

Merging #3677 into master will decrease coverage by <.1%.
The diff coverage is 33.3%.

@@           Coverage Diff            @@
##           master   #3677     +/-   ##
========================================
- Coverage    79.6%   79.6%   -0.1%     
========================================
  Files         155     155             
  Lines       24863   24865      +2     
========================================
+ Hits        19805   19806      +1     
- Misses       5058    5059      +1

Copy link
Contributor

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

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

I'm fine with this. Definitely an improvement. (However, it's obvious that rpc_client needs some reconstructive surgery. It's a mish-mash of methods scraped from rpc and thin_client, and retry handling is all over the place 🤢 )

@sakridge sakridge merged commit 6540fa9 into solana-labs:master Apr 8, 2019
@sakridge sakridge deleted the check-signature-change branch April 8, 2019 22:09
@sakridge
Copy link
Member Author

sakridge commented Apr 8, 2019

@CriesofCarrots agreed

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