This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Add confirmed transaction lookups and always track roots #3749
Merged
solana-grimes
merged 2 commits into
solana-labs:master
from
sagar-solana:fix_blockstreamer
Apr 12, 2019
Merged
Add confirmed transaction lookups and always track roots #3749
solana-grimes
merged 2 commits into
solana-labs:master
from
sagar-solana:fix_blockstreamer
Apr 12, 2019
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
@mvines, I tried this with 3 nodes running off of my PC and it seems to work. Can you help verify blockstreamer ? |
Codecov Report
@@ Coverage Diff @@
## master #3749 +/- ##
========================================
+ Coverage 79.3% 79.3% +<.1%
========================================
Files 155 155
Lines 24946 24951 +5
========================================
+ Hits 19791 19796 +5
Misses 5155 5155 |
mvines
approved these changes
Apr 12, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
runtime/src/bank.rs
Outdated
@@ -867,6 +874,13 @@ impl Bank { | |||
pub fn transaction_count(&self) -> u64 { | |||
self.transaction_count.load(Ordering::Relaxed) as u64 | |||
} | |||
pub fn confirmed_transaction_count(&self) -> u64 { | |||
if let Some(bank) = self.parents().last() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this one-liner work instead?
self.parents().last().unwrap_or(self).transaction_count()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not exactly, we've got &self and each parent is &Arc
29dc999
to
72904b6
Compare
mvines
approved these changes
Apr 12, 2019
This was referenced Apr 13, 2019
joncinque
pushed a commit
to joncinque/solana
that referenced
this pull request
Nov 26, 2024
* Add CODEOWNERS for SVM-related directories * Remove whitespace for sanity check
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Problem
Nodes use bleeding edge banks for all RPC APIs. This results in some apis reporting different results on different nodes
Summary of Changes
Ensure the root is always updated (even when no voting keypair is provided) and only provide confirmed blockhashes to rpc clients.
Fixes #3442