clippy
This commit is contained in:
@ -4708,14 +4708,10 @@ pub mod tests {
|
||||
if slot % 3 == 0 {
|
||||
let shred0 = shreds_for_slot.remove(0);
|
||||
missing_shreds.push(shred0);
|
||||
blockstore
|
||||
.insert_shreds(shreds_for_slot, None, false)
|
||||
.unwrap();
|
||||
} else {
|
||||
blockstore
|
||||
.insert_shreds(shreds_for_slot, None, false)
|
||||
.unwrap();
|
||||
}
|
||||
blockstore
|
||||
.insert_shreds(shreds_for_slot, None, false)
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
// Check metadata
|
||||
|
@ -449,6 +449,7 @@ impl<T: SlotColumn> Column for T {
|
||||
index
|
||||
}
|
||||
|
||||
#[allow(clippy::wrong_self_convention)]
|
||||
fn as_index(slot: Slot) -> u64 {
|
||||
slot
|
||||
}
|
||||
@ -480,6 +481,7 @@ impl Column for columns::TransactionStatus {
|
||||
index.0
|
||||
}
|
||||
|
||||
#[allow(clippy::wrong_self_convention)]
|
||||
fn as_index(index: u64) -> Self::Index {
|
||||
(index, Signature::default(), 0)
|
||||
}
|
||||
@ -516,6 +518,7 @@ impl Column for columns::AddressSignatures {
|
||||
index.0
|
||||
}
|
||||
|
||||
#[allow(clippy::wrong_self_convention)]
|
||||
fn as_index(index: u64) -> Self::Index {
|
||||
(index, Pubkey::default(), 0, Signature::default())
|
||||
}
|
||||
@ -542,6 +545,7 @@ impl Column for columns::TransactionStatusIndex {
|
||||
index
|
||||
}
|
||||
|
||||
#[allow(clippy::wrong_self_convention)]
|
||||
fn as_index(slot: u64) -> u64 {
|
||||
slot
|
||||
}
|
||||
@ -590,6 +594,7 @@ impl Column for columns::ShredCode {
|
||||
index.0
|
||||
}
|
||||
|
||||
#[allow(clippy::wrong_self_convention)]
|
||||
fn as_index(slot: Slot) -> Self::Index {
|
||||
(slot, 0)
|
||||
}
|
||||
@ -619,6 +624,7 @@ impl Column for columns::ShredData {
|
||||
index.0
|
||||
}
|
||||
|
||||
#[allow(clippy::wrong_self_convention)]
|
||||
fn as_index(slot: Slot) -> Self::Index {
|
||||
(slot, 0)
|
||||
}
|
||||
@ -697,6 +703,7 @@ impl Column for columns::ErasureMeta {
|
||||
index.0
|
||||
}
|
||||
|
||||
#[allow(clippy::wrong_self_convention)]
|
||||
fn as_index(slot: Slot) -> Self::Index {
|
||||
(slot, 0)
|
||||
}
|
||||
|
@ -33,10 +33,8 @@ impl LeaderSchedule {
|
||||
.map(|i| {
|
||||
if i % repeat == 0 {
|
||||
current_node = ids[weighted_index.sample(rng)];
|
||||
current_node
|
||||
} else {
|
||||
current_node
|
||||
}
|
||||
current_node
|
||||
})
|
||||
.collect();
|
||||
Self::new_from_schedule(slot_leaders)
|
||||
|
Reference in New Issue
Block a user