From 63acedc0dca808335188dc21106c1fa0ef2b8e3a Mon Sep 17 00:00:00 2001 From: A5 Pickle Date: Tue, 23 Jan 2024 08:26:27 -0600 Subject: [PATCH] solana: speed up test --- solana/Anchor.toml | 4 ++++ solana/ts/tests/helpers/utils.ts | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/solana/Anchor.toml b/solana/Anchor.toml index 4547cc2..908e6ec 100644 --- a/solana/Anchor.toml +++ b/solana/Anchor.toml @@ -30,6 +30,10 @@ startup_wait = 16000 [test.validator] url = "https://api.devnet.solana.com" +### At 160 ticks/s, 64 ticks per slot implies that leader rotation and voting will happen +### every 400 ms. A fast voting cadence ensures faster finality and convergence +ticks_per_slot = 8 + ### Forked Wormhole Circle Integration Program [[test.validator.clone]] address = "wCCTPvsyeL9qYqbHTv3DUAyzEfYcyHoYw5c4mgcbBeW" diff --git a/solana/ts/tests/helpers/utils.ts b/solana/ts/tests/helpers/utils.ts index 4686e76..55b3579 100644 --- a/solana/ts/tests/helpers/utils.ts +++ b/solana/ts/tests/helpers/utils.ts @@ -181,8 +181,8 @@ export async function loadProgramBpf( ); // Sometimes the validator fails to fetch a blockhash after this buffer gets loaded, so we wait - // a bit to ensure that doesn't happen. - await new Promise((resolve) => setTimeout(resolve, 5000)); + // a bit to ensure that doesn't happen. Uncomment this in if this is an issue. + //await new Promise((resolve) => setTimeout(resolve, 5000)); // Return the pubkey for the buffer (our new program implementation). return buffer;