Skip to content

Commit

Permalink
Merge pull request #1487 from zancas/fix_names
Browse files Browse the repository at this point in the history
make example seed names more human friendly, and change imports
  • Loading branch information
fluidvanadium authored Nov 4, 2024
2 parents 2c5d8a8 + eb45639 commit e96c48e
Show file tree
Hide file tree
Showing 6 changed files with 139 additions and 181 deletions.
4 changes: 1 addition & 3 deletions libtonode-tests/tests/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ mod load_wallet {
println!("loading wallet");

let wallet = examples::NetworkSeedVersion::Regtest(
examples::RegtestSeedVersion::HMVASMUVWMSSVICHCARBPOCT(
examples::HMVASMUVWMSSVICHCARBPOCTVersion::V27,
),
examples::RegtestSeedVersion::HospitalMuseum(examples::HospitalMuseumVersion::V27),
)
.load_example_wallet()
.await;
Expand Down
43 changes: 16 additions & 27 deletions zingolib/src/lightclient/send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,10 @@ pub mod send_with_proposal {
/// this is a live send test. whether it can work depends on the state of live wallet on the blockchain
/// this wallet contains archaic diversified addresses, which may clog the new send engine.
async fn testnet_shield_multi_account() {
let case = examples::NetworkSeedVersion::Testnet(
examples::TestnetSeedVersion::MSKMGDBHOTBPETCJWCSPGOPP(
examples::MSKMGDBHOTBPETCJWCSPGOPPVersion::Ga74fed621,
),
);
let case =
examples::NetworkSeedVersion::Testnet(examples::TestnetSeedVersion::MobileShuffle(
examples::MobileShuffleVersion::Ga74fed621,
));

let client = sync_example_wallet(case).await;

Expand All @@ -383,11 +382,10 @@ pub mod send_with_proposal {
/// this is a live send test. whether it can work depends on the state of live wallet on the blockchain
/// note: live send waits 2 minutes for confirmation. expect 3min runtime
async fn testnet_send_to_self_orchard() {
let case = examples::NetworkSeedVersion::Testnet(
examples::TestnetSeedVersion::CBBHRWIILGBRABABSSHSMTPR(
examples::CBBHRWIILGBRABABSSHSMTPRVersion::G2f3830058,
),
);
let case =
examples::NetworkSeedVersion::Testnet(examples::TestnetSeedVersion::ChimneyBetter(
examples::ChimneyBetterVersion::G2f3830058,
));

let client = sync_example_wallet(case).await;

Expand All @@ -410,11 +408,10 @@ pub mod send_with_proposal {
/// this is a live sync test. its execution time scales linearly since last updated
/// note: live send waits 2 minutes for confirmation. expect 3min runtime
async fn testnet_shield() {
let case = examples::NetworkSeedVersion::Testnet(
examples::TestnetSeedVersion::CBBHRWIILGBRABABSSHSMTPR(
examples::CBBHRWIILGBRABABSSHSMTPRVersion::G2f3830058,
),
);
let case =
examples::NetworkSeedVersion::Testnet(examples::TestnetSeedVersion::ChimneyBetter(
examples::ChimneyBetterVersion::G2f3830058,
));

let client = sync_example_wallet(case).await;

Expand All @@ -429,9 +426,7 @@ pub mod send_with_proposal {
/// note: live send waits 2 minutes for confirmation. expect 3min+ runtime
async fn mainnet_send_to_self_orchard() {
let case = examples::NetworkSeedVersion::Mainnet(
examples::MainnetSeedVersion::HHCCLALTPCCKCSSLPCNETBLR(
examples::HHCCLALTPCCKCSSLPCNETBLRVersion::Latest,
),
examples::MainnetSeedVersion::HotelHumor(examples::HotelHumorVersion::Latest),
);
let target_pool = PoolType::Shielded(ShieldedProtocol::Orchard);

Expand Down Expand Up @@ -464,9 +459,7 @@ pub mod send_with_proposal {
#[ignore = "dont automatically run hot tests! this test spends actual zec!"]
async fn mainnet_send_to_self_sapling() {
let case = examples::NetworkSeedVersion::Mainnet(
examples::MainnetSeedVersion::HHCCLALTPCCKCSSLPCNETBLR(
examples::HHCCLALTPCCKCSSLPCNETBLRVersion::Latest,
),
examples::MainnetSeedVersion::HotelHumor(examples::HotelHumorVersion::Latest),
);
let target_pool = PoolType::Shielded(ShieldedProtocol::Sapling);

Expand Down Expand Up @@ -499,9 +492,7 @@ pub mod send_with_proposal {
#[ignore = "dont automatically run hot tests! this test spends actual zec!"]
async fn mainnet_send_to_self_transparent() {
let case = examples::NetworkSeedVersion::Mainnet(
examples::MainnetSeedVersion::HHCCLALTPCCKCSSLPCNETBLR(
examples::HHCCLALTPCCKCSSLPCNETBLRVersion::Latest,
),
examples::MainnetSeedVersion::HotelHumor(examples::HotelHumorVersion::Latest),
);
let target_pool = PoolType::Transparent;

Expand Down Expand Up @@ -534,9 +525,7 @@ pub mod send_with_proposal {
#[ignore = "dont automatically run hot tests! this test spends actual zec!"]
async fn mainnet_shield() {
let case = examples::NetworkSeedVersion::Mainnet(
examples::MainnetSeedVersion::HHCCLALTPCCKCSSLPCNETBLR(
examples::HHCCLALTPCCKCSSLPCNETBLRVersion::Latest,
),
examples::MainnetSeedVersion::HotelHumor(examples::HotelHumorVersion::Latest),
);
let client = sync_example_wallet(case).await;

Expand Down
12 changes: 3 additions & 9 deletions zingolib/src/lightclient/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -720,9 +720,7 @@ pub mod test {
#[tokio::test]
async fn testnet_sync_mskmgdbhotbpetcjwcspgopp() {
sync_example_wallet(examples::NetworkSeedVersion::Testnet(
examples::TestnetSeedVersion::MSKMGDBHOTBPETCJWCSPGOPP(
examples::MSKMGDBHOTBPETCJWCSPGOPPVersion::Ga74fed621,
),
examples::TestnetSeedVersion::MobileShuffle(examples::MobileShuffleVersion::Ga74fed621),
))
.await;
}
Expand All @@ -731,9 +729,7 @@ pub mod test {
#[tokio::test]
async fn testnet_sync_cbbhrwiilgbrababsshsmtpr() {
sync_example_wallet(examples::NetworkSeedVersion::Testnet(
examples::TestnetSeedVersion::CBBHRWIILGBRABABSSHSMTPR(
examples::CBBHRWIILGBRABABSSHSMTPRVersion::G2f3830058,
),
examples::TestnetSeedVersion::ChimneyBetter(examples::ChimneyBetterVersion::G2f3830058),
))
.await;
}
Expand All @@ -742,9 +738,7 @@ pub mod test {
#[ignore = "testnet and mainnet tests should be ignored due to increasingly large execution times"]
async fn mainnet_sync() {
sync_example_wallet(examples::NetworkSeedVersion::Mainnet(
examples::MainnetSeedVersion::HHCCLALTPCCKCSSLPCNETBLR(
examples::HHCCLALTPCCKCSSLPCNETBLRVersion::Gf0aaf9347,
),
examples::MainnetSeedVersion::HotelHumor(examples::HotelHumorVersion::Gf0aaf9347),
))
.await;
}
Expand Down
Loading

0 comments on commit e96c48e

Please sign in to comment.