diff --git a/ci/upload_ci_artifact.sh b/ci/upload_ci_artifact.sh index 94d4bd9d1c50fb..9bbdce3c7369b0 100644 --- a/ci/upload_ci_artifact.sh +++ b/ci/upload_ci_artifact.sh @@ -1,18 +1,18 @@ # |source| me upload_ci_artifact() { - echo --- artifact: $1 - if [[ -r $1 ]]; then - ls -l $1 + echo "--- artifact: $1" + if [[ -r "$1" ]]; then + ls -l "$1" if ${BUILDKITE:-false}; then ( set -x - buildkite-agent artifact upload $1 + buildkite-agent artifact upload "$1" ) fi else echo ^^^ +++ - echo $1 not found + echo "$1 not found" fi } diff --git a/src/bank.rs b/src/bank.rs index 7358b69a1dadfb..26fd7d6466ff04 100644 --- a/src/bank.rs +++ b/src/bank.rs @@ -87,11 +87,6 @@ pub struct Bank { /// The number of transactions the bank has processed without error since the /// start of the ledger. transaction_count: AtomicUsize, - - /// The number of Entries the bank has processed without error since start - /// of the ledger, i.e. poor-man's network synchronization - /// TODO: upgrade to U64 when stable? - entry_count: AtomicUsize, } impl Bank { @@ -105,7 +100,6 @@ impl Bank { time_sources: RwLock::new(HashSet::new()), last_time: RwLock::new(Utc.timestamp(0, 0)), transaction_count: AtomicUsize::new(0), - entry_count: AtomicUsize::new(0), }; bank.apply_payment(deposit, &mut bank.balances.write().unwrap()); bank @@ -302,13 +296,11 @@ impl Bank { } /// Process an ordered list of entries. - pub fn process_entries(&self, entries: I) -> Result + pub fn process_entries(&self, entries: I) -> Result<()> where I: IntoIterator, { for entry in entries { - self.entry_count.fetch_add(1, Ordering::Relaxed); - if !entry.transactions.is_empty() { for result in self.process_transactions(entry.transactions) { result?; @@ -316,7 +308,7 @@ impl Bank { } self.register_entry_id(&entry.id); } - Ok(self.entry_count()) + Ok(()) } /// Process a Witness Signature. Any payment plans waiting on this signature @@ -430,9 +422,6 @@ impl Bank { pub fn transaction_count(&self) -> usize { self.transaction_count.load(Ordering::Relaxed) } - pub fn entry_count(&self) -> usize { - self.entry_count.load(Ordering::Relaxed) - } } #[cfg(test)] diff --git a/src/bin/fullnode.rs b/src/bin/fullnode.rs index b4f4dbe351724f..b1acf1bdd4f6f6 100644 --- a/src/bin/fullnode.rs +++ b/src/bin/fullnode.rs @@ -102,8 +102,7 @@ fn main() { bank.register_entry_id(&entry1.id); eprintln!("processing entries..."); - let num_entries = bank.process_entries(entries).expect("process_entries"); - eprintln!("processed {} entries...", num_entries); + bank.process_entries(entries).expect("process_entries"); eprintln!("creating networking stack..."); diff --git a/src/streamer.rs b/src/streamer.rs index 958724b828007f..8fe1b949d44311 100644 --- a/src/streamer.rs +++ b/src/streamer.rs @@ -396,14 +396,13 @@ pub fn window( r: BlobReceiver, s: BlobSender, retransmit: BlobSender, - entry_count: usize, ) -> JoinHandle<()> { Builder::new() .name("solana-window".to_string()) .spawn(move || { - let mut consumed = entry_count; - let mut received = entry_count; - let mut last = entry_count; + let mut consumed = 0; + let mut received = 0; + let mut last = 0; let mut times = 0; loop { if exit.load(Ordering::Relaxed) { @@ -822,7 +821,6 @@ mod test { r_reader, s_window, s_retransmit, - 0, ); let (s_responder, r_responder) = channel(); let t_responder = responder( diff --git a/src/tvu.rs b/src/tvu.rs index 014beb06ec4009..f338d0b1e7bf87 100644 --- a/src/tvu.rs +++ b/src/tvu.rs @@ -86,7 +86,6 @@ impl Tvu { exit.clone(), blob_recycler.clone(), fetch_stage.blob_receiver, - bank.entry_count(), ); let replicate_stage = diff --git a/src/window_stage.rs b/src/window_stage.rs index 4cc7eceb6853fc..36264a88d26411 100644 --- a/src/window_stage.rs +++ b/src/window_stage.rs @@ -22,7 +22,6 @@ impl WindowStage { exit: Arc, blob_recycler: packet::BlobRecycler, fetch_stage_receiver: streamer::BlobReceiver, - entry_count: usize, ) -> Self { let (retransmit_sender, retransmit_receiver) = channel(); @@ -42,7 +41,6 @@ impl WindowStage { fetch_stage_receiver, blob_sender, retransmit_sender, - entry_count, ); let thread_hdls = vec![t_retransmit, t_window];