Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
wip: make tests build
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyera Eulberg committed Sep 27, 2023
1 parent bd0ace1 commit 80278f6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 14 additions & 1 deletion ledger/src/blockstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8387,6 +8387,7 @@ pub mod tests {
vec![&address0],
vec![&address1],
TransactionStatusMeta::default(),
x as usize,
)
.unwrap();
}
Expand All @@ -8400,6 +8401,7 @@ pub mod tests {
vec![&address0],
vec![&address1],
TransactionStatusMeta::default(),
x as usize,
)
.unwrap();
}
Expand Down Expand Up @@ -8493,6 +8495,7 @@ pub mod tests {
vec![&address0],
vec![&address1],
TransactionStatusMeta::default(),
0,
)
.unwrap();
}
Expand Down Expand Up @@ -8522,6 +8525,7 @@ pub mod tests {
vec![&address0],
vec![&address1],
TransactionStatusMeta::default(),
x as usize,
)
.unwrap();
}
Expand All @@ -8535,6 +8539,7 @@ pub mod tests {
vec![&address0],
vec![&address1],
TransactionStatusMeta::default(),
x as usize,
)
.unwrap();
}
Expand All @@ -8547,6 +8552,7 @@ pub mod tests {
vec![&address0],
vec![&address1],
TransactionStatusMeta::default(),
x as usize,
)
.unwrap();
}
Expand All @@ -8560,6 +8566,7 @@ pub mod tests {
vec![&address0],
vec![&address1],
TransactionStatusMeta::default(),
x as usize,
)
.unwrap();
}
Expand Down Expand Up @@ -8632,6 +8639,7 @@ pub mod tests {
);
blockstore.insert_shreds(shreds, None, false).unwrap();

let mut counter = 0;
for entry in entries.into_iter() {
for transaction in entry.transactions {
assert_eq!(transaction.signatures.len(), 1);
Expand All @@ -8642,8 +8650,10 @@ pub mod tests {
transaction.message.static_account_keys().iter().collect(),
vec![],
TransactionStatusMeta::default(),
counter,
)
.unwrap();
counter += 1;
}
}
}
Expand All @@ -8657,6 +8667,7 @@ pub mod tests {
entries_to_test_shreds(&entries, slot, 8, true, 0, /*merkle_variant:*/ true);
blockstore.insert_shreds(shreds, None, false).unwrap();

let mut counter = 0;
for entry in entries.into_iter() {
for transaction in entry.transactions {
assert_eq!(transaction.signatures.len(), 1);
Expand All @@ -8667,8 +8678,10 @@ pub mod tests {
transaction.message.static_account_keys().iter().collect(),
vec![],
TransactionStatusMeta::default(),
counter,
)
.unwrap();
counter += 1;
}
}
}
Expand Down Expand Up @@ -9024,7 +9037,7 @@ pub mod tests {
// Remove signature
blockstore
.address_signatures_cf
.delete((0, address0, 2, all0[0].signature))
.delete((address0, 2, 0, all0[0].signature))
.unwrap();
let sig_infos = blockstore
.get_confirmed_signatures_for_address2(
Expand Down
2 changes: 2 additions & 0 deletions ledger/src/blockstore/blockstore_purge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@ pub mod tests {
vec![&Pubkey::try_from(&random_bytes[..32]).unwrap()],
vec![&Pubkey::try_from(&random_bytes[32..]).unwrap()],
TransactionStatusMeta::default(),
0,
)
.unwrap();
}
Expand All @@ -514,6 +515,7 @@ pub mod tests {
vec![&Pubkey::try_from(&random_bytes[..32]).unwrap()],
vec![&Pubkey::try_from(&random_bytes[32..]).unwrap()],
TransactionStatusMeta::default(),
0,
)
.unwrap();
}
Expand Down

0 comments on commit 80278f6

Please sign in to comment.