Skip to content

Commit

Permalink
Update getSolanaCLI
Browse files Browse the repository at this point in the history
  • Loading branch information
POPPIN-FUMI committed Nov 20, 2024
1 parent 541ca12 commit 99f7f96
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
7 changes: 7 additions & 0 deletions .changeset/empty-pears-enjoy.md
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.
17 changes: 3 additions & 14 deletions packages/solv/src/config/getSolanaCLI.ts
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

0 comments on commit 99f7f96

Please sign in to comment.