forked from MiniblockchainProject/Cryptonite
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Various bug fixes, updates and optimizations. #18
Open
e-nexus
wants to merge
24
commits into
pallas1:master
Choose a base branch
from
e-nexus:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Reuse CDataStream objects inside the block index loading loop to minimize dynamic memory allocations. - Clear and reserve CDataStream buffers before writing to them, reducing the need for buffer resizing. - Restrict the try-catch block scope to only the deserialization process to decrease exception handling overhead.
- Display results
Replaced push_back with emplace_back for direct in-place construction of CDNSSeedData objects. Optimizes the addition of seed nodes by eliminating unnecessary copy or move operations.
Causes SEG FAULT
Commit updates from GUI branch
Upgraded limitedmap using C++11 features: switched to emplace for efficient in-place construction, adopted auto for type inference, added assert for size validation, and optimized erase and update methods.
1. `Insert` and `Remove` Methods: - Streamlined conditional logic for improved clarity and performance. - Enhanced memory management to ensure efficient node handling. 2. `TraverseLeft` and `TraverseRight` Methods: - Optimized traversal logic to reduce redundant calculations. - Implemented sorting and uniqueness checks to improve list operations. - Enhanced error handling and input validation. 3. `Prove` Method: - Introduced robust error checking for edge cases. - Optimized list handling by removing duplicates and streamlining removal operations. - Refined logical flow to enhance performance. 4. `Find` Method: - Simplified branching logic to reduce code redundancy.
Use seperate sets for tx inputs & outputs in duplicate checks to avoid false positives.
More Optimizing
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.