-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove local testnet code #569
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,31 +17,29 @@ async function get (url) { | |
async function main () { | ||
let network = process.argv[2] || 'gaia-2' | ||
|
||
if (network === 'local') { | ||
runDev('./app/networks/local') | ||
} else { | ||
// fetch genesis.json and config.toml from github testnets repo, | ||
// save to tmp dir and pass to app dev runner | ||
console.log(`fetching genesis for network "${network}"`) | ||
let genesisJson = await get(`https://github.com/tendermint/testnets/raw/master/${network}/gaia/genesis.json`) | ||
.catch(e => { | ||
throw new Error(`Can't load genesis.json: ${e.message}`) | ||
}) | ||
let configToml = await get(`https://github.com/tendermint/testnets/raw/master/${network}/gaia/config.toml`) | ||
.catch(e => { | ||
throw new Error(`Can't load config.toml: ${e.message}`) | ||
}) | ||
let gaiaVersionTxt = await get(`https://github.com/tendermint/testnets/raw/master/${network}/gaia/gaiaversion.txt`) | ||
.catch(e => { | ||
throw new Error(`Can't load config.toml: ${e.message}`) | ||
}) | ||
let path = join(tmpdir(), Math.random().toString(36).slice(2)) | ||
mkdirp(path) | ||
write(join(path, 'genesis.json'), genesisJson) | ||
write(join(path, 'config.toml'), configToml) | ||
write(join(path, 'gaiaversion.txt'), gaiaVersionTxt) | ||
runDev(path) | ||
} | ||
// fetch genesis.json and config.toml from github testnets repo, | ||
// save to tmp dir and pass to app dev runner | ||
console.log(`fetching genesis for network "${network}"`) | ||
let genesisJson = await get(`https://github.com/tendermint/testnets/raw/master/${network}/gaia/genesis.json`) | ||
.catch(e => { | ||
throw new Error(`Can't load genesis.json: ${e.message}`) | ||
}) | ||
let configToml = await get(`https://github.com/tendermint/testnets/raw/master/${network}/gaia/config.toml`) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
.catch(e => { | ||
throw new Error(`Can't load config.toml: ${e.message}`) | ||
}) | ||
let gaiaVersionTxt = await get(`https://github.com/tendermint/testnets/raw/master/${network}/gaia/gaiaversion.txt`) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
.catch(e => { | ||
throw new Error(`Can't load config.toml: ${e.message}`) | ||
}) | ||
let path = join(tmpdir(), Math.random().toString(36).slice(2)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
mkdirp(path) | ||
write(join(path, 'genesis.json'), genesisJson) | ||
write(join(path, 'config.toml'), configToml) | ||
write(join(path, 'gaiaversion.txt'), gaiaVersionTxt) | ||
|
||
// run Voyager in a developmnet environment | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. development |
||
runDev(path) | ||
} | ||
|
||
main().catch(function (err) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be
const genesisJson
.