impl default version of contains_multiple_slots (#30055)
This commit is contained in:
parent
5769dbf36b
commit
1c4e84b8ca
|
@ -9536,9 +9536,6 @@ pub mod tests {
|
|||
fn len(&self) -> usize {
|
||||
self.1.len()
|
||||
}
|
||||
fn contains_multiple_slots(&self) -> bool {
|
||||
false
|
||||
}
|
||||
fn include_slot_in_hash(&self) -> IncludeSlotInHash {
|
||||
INCLUDE_SLOT_IN_HASH_TESTS
|
||||
}
|
||||
|
|
|
@ -1189,9 +1189,6 @@ impl<'a> StorableAccounts<'a, AccountSharedData> for (Slot, &'a [StakeReward], I
|
|||
fn len(&self) -> usize {
|
||||
self.1.len()
|
||||
}
|
||||
fn contains_multiple_slots(&self) -> bool {
|
||||
false
|
||||
}
|
||||
fn include_slot_in_hash(&self) -> IncludeSlotInHash {
|
||||
self.2
|
||||
}
|
||||
|
|
|
@ -31,7 +31,9 @@ pub trait StorableAccounts<'a, T: ReadableAccount + Sync>: Sync {
|
|||
fn len(&self) -> usize;
|
||||
/// are there accounts from multiple slots
|
||||
/// only used for an assert
|
||||
fn contains_multiple_slots(&self) -> bool;
|
||||
fn contains_multiple_slots(&self) -> bool {
|
||||
false
|
||||
}
|
||||
/// true iff hashing these accounts should include the slot
|
||||
fn include_slot_in_hash(&self) -> IncludeSlotInHash;
|
||||
|
||||
|
@ -87,9 +89,6 @@ impl<'a, T: ReadableAccount + Sync> StorableAccounts<'a, T> for StorableAccounts
|
|||
fn len(&self) -> usize {
|
||||
self.accounts.len()
|
||||
}
|
||||
fn contains_multiple_slots(&self) -> bool {
|
||||
false
|
||||
}
|
||||
fn include_slot_in_hash(&self) -> IncludeSlotInHash {
|
||||
self.include_slot_in_hash
|
||||
}
|
||||
|
@ -116,9 +115,6 @@ impl<'a, T: ReadableAccount + Sync> StorableAccounts<'a, T>
|
|||
fn len(&self) -> usize {
|
||||
self.1.len()
|
||||
}
|
||||
fn contains_multiple_slots(&self) -> bool {
|
||||
false
|
||||
}
|
||||
fn include_slot_in_hash(&self) -> IncludeSlotInHash {
|
||||
self.2
|
||||
}
|
||||
|
@ -145,9 +141,6 @@ impl<'a> StorableAccounts<'a, StoredAccountMeta<'a>>
|
|||
fn len(&self) -> usize {
|
||||
self.1.len()
|
||||
}
|
||||
fn contains_multiple_slots(&self) -> bool {
|
||||
false
|
||||
}
|
||||
fn include_slot_in_hash(&self) -> IncludeSlotInHash {
|
||||
self.2
|
||||
}
|
||||
|
@ -292,9 +285,6 @@ impl<'a> StorableAccounts<'a, StoredAccountMeta<'a>>
|
|||
fn len(&self) -> usize {
|
||||
self.1.len()
|
||||
}
|
||||
fn contains_multiple_slots(&self) -> bool {
|
||||
false
|
||||
}
|
||||
fn include_slot_in_hash(&self) -> IncludeSlotInHash {
|
||||
self.2
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue