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

Optimization: ; async sync_missing_relay_past_headers #630

Closed
wants to merge 5 commits into from

Conversation

miningexperiments
Copy link
Contributor

Optimization

flow.rs ; async sync_missing_relay_past_headers

Fix

  • Save memory; changed jobs to pass an iterator to try_join_all instead of collecting a vector and then passing it.

  • Changed error check to return an explicit error, instead of implicit

Changed functions to use std::time::Instant which is monotonic, to avoid Rust panics with SystemTime. 

Replaced some unwraps with an expect.

Removed redundant brackets, and secp256k1::
Changed fn clean_old_pending_outpoints to retain keys that are younger than an hour, instead of collecting older than an hour ones as a vector, and then using a new for loop to deleting them.

linting with cargo fmt
# Optimization
flow.rs ; async sync_missing_relay_past_headers

# Fix
- Save memory; changed jobs to pass an iterator to try_join_all instead of collecting a vector and then passing it.

- Changed error check to return an explicit error, instead of implicit
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.

1 participant