Skip to content

Commit

Permalink
remove solana-sdk from transaction-metrics-tracker dev deps (#3991)
Browse files Browse the repository at this point in the history
* remove solana-sdk from transaction-metrics-tracker dev deps

* fmt
  • Loading branch information
kevinheavey authored Dec 9, 2024
1 parent a6148bd commit 9df7afb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
5 changes: 4 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion transaction-metrics-tracker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ solana-short-vec = { workspace = true }
solana-signature = { workspace = true }

[dev-dependencies]
solana-sdk = { workspace = true }
solana-hash = { workspace = true }
solana-keypair = { workspace = true }
solana-pubkey = { workspace = true, features = ["rand"] }
solana-system-transaction = { workspace = true }

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
14 changes: 5 additions & 9 deletions transaction-metrics-tracker/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,8 @@ pub fn get_signature_from_packet(packet: &Packet) -> Result<&[u8; SIGNATURE_BYTE
#[cfg(test)]
mod tests {
use {
super::*,
solana_sdk::{
hash::Hash,
signature::{Keypair, Signature},
system_transaction,
},
super::*, solana_hash::Hash, solana_keypair::Keypair, solana_signature::Signature,
solana_system_transaction as system_transaction,
};

#[test]
Expand All @@ -72,7 +68,7 @@ mod tests {
// Use a valid transaction, it should succeed
let tx = system_transaction::transfer(
&Keypair::new(),
&solana_sdk::pubkey::new_rand(),
&solana_pubkey::new_rand(),
1,
Hash::new_unique(),
);
Expand Down Expand Up @@ -116,7 +112,7 @@ mod tests {
// Use a valid transaction which is not matched
let tx = system_transaction::transfer(
&Keypair::new(),
&solana_sdk::pubkey::new_rand(),
&solana_pubkey::new_rand(),
1,
Hash::new_unique(),
);
Expand All @@ -127,7 +123,7 @@ mod tests {
// Now simulate a txn matching the signature mask
let mut tx = system_transaction::transfer(
&Keypair::new(),
&solana_sdk::pubkey::new_rand(),
&solana_pubkey::new_rand(),
1,
Hash::new_unique(),
);
Expand Down

0 comments on commit 9df7afb

Please sign in to comment.