-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
541ca12
commit 99f7f96
Showing
2 changed files
with
10 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@epics-dao/solv': patch | ||
--- | ||
|
||
Update getSolanaCLI | ||
|
||
Remove solana-cli since now `agave-validator` is used for mainnet-beta and testnet. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,11 @@ | ||
import getSolanaVersion from '@/cli/epochTimer/getSolanaVersion' | ||
|
||
const SOLANA_CLI = 'solana-validator' | ||
const AGAVE_CLI = 'agave-validator' | ||
|
||
export type SolanaCLI = typeof SOLANA_CLI | typeof AGAVE_CLI | ||
|
||
const getSolanaCLI = (): SolanaCLI => { | ||
const getSolanaCLI = () => { | ||
try { | ||
const solanaVersion = getSolanaVersion() | ||
const hasVersion2 = solanaVersion.startsWith('2.') | ||
if (hasVersion2) { | ||
return AGAVE_CLI | ||
} | ||
return SOLANA_CLI | ||
return AGAVE_CLI | ||
} catch (error) { | ||
console.error(error) | ||
return SOLANA_CLI | ||
return AGAVE_CLI | ||
} | ||
} | ||
|
||
export default getSolanaCLI |