Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Greg Fitzgerald
2020-06-17 21:54:52 -06:00
committed by GitHub
parent 5b9cd72d8f
commit 0550b893b0
29 changed files with 45 additions and 46 deletions

View File

@ -1176,7 +1176,7 @@ impl Blockstore {
buffer_offset += shred_len;
last_index = index;
// All shreds are of the same length.
// Let's check if we have scope to accomodate another shred
// Let's check if we have scope to accommodate another shred
// If not, let's break right away, as it'll save on 1 DB read
if buffer.len().saturating_sub(buffer_offset) < shred_len {
break;
@ -2123,7 +2123,7 @@ impl Blockstore {
.expect("fetch from DuplicateSlots column family failed")
}
// `new_shred` is asssumed to have slot and index equal to the given slot and index.
// `new_shred` is assumed to have slot and index equal to the given slot and index.
// Returns the existing shred if `new_shred` is not equal to the existing shred at the
// given slot and index as this implies the leader generated two different shreds with
// the same slot and index
@ -2674,7 +2674,7 @@ pub fn create_new_ledger(
}
// ensure the genesis archive can be unpacked and it is under
// max_genesis_archive_unpacked_size, immedately after creating it above.
// max_genesis_archive_unpacked_size, immediately after creating it above.
{
let temp_dir = tempfile::TempDir::new().unwrap();
// unpack into a temp dir, while completely discarding the unpacked files

View File

@ -1482,7 +1482,7 @@ pub mod tests {
let rooted_slots: Vec<_> = (0..=last_slot).collect();
blockstore.set_roots(&rooted_slots).unwrap();
// Set a root on the next slot of the confrimed epoch
// Set a root on the next slot of the confirmed epoch
blockstore.set_roots(&[last_slot + 1]).unwrap();
// Check that we can properly restart the ledger / leader scheduler doesn't fail

View File

@ -738,7 +738,7 @@ mod tests {
let tx0 = system_transaction::transfer(&keypair, &keypair.pubkey(), 0, zero);
let tx1 = system_transaction::transfer(&keypair, &keypair.pubkey(), 1, zero);
// Verify entry with 2 transctions
// Verify entry with 2 transactions
let mut e0 = vec![Entry::new(&zero, 0, vec![tx0, tx1])];
assert!(e0.verify(&zero));

View File

@ -51,7 +51,7 @@ impl<'a> Iterator for RootedSlotIterator<'a> {
.map(|r| {
self.blockstore
.meta(r)
.expect("Database failure, couldnt fetch SlotMeta")
.expect("Database failure, couldn't fetch SlotMeta")
})
.unwrap_or(None);

View File

@ -1584,7 +1584,7 @@ pub mod tests {
});
coding_shreds.iter().enumerate().for_each(|(i, s)| {
// There'll be half the number of coding shreds, as FEC rate is 0.5
// There will be half the number of coding shreds, as FEC rate is 0.5
// So multiply i with 2
let expected_fec_set_index =
start_index + ((i * 2 / max_per_block) * max_per_block) as u32;