Skip to content
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

Fabo/204 fix initial crash #210

Merged
merged 2 commits into from
Dec 8, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions app/src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const WIN = /^win/.test(process.platform)
const DEV = process.env.NODE_ENV === 'development'
const TEST = JSON.parse(process.env.COSMOS_TEST || 'false') !== false
// TODO default logging or default disable logging?
const LOGGING = JSON.parse(process.env.LOGGING || DEV) !== false
const LOGGING = JSON.parse(process.env.LOGGING || 'true') !== false
const MOCK = JSON.parse(process.env.MOCK || !TEST && DEV) !== false
const winURL = DEV
? `http://localhost:${require('../../../config').port}`
Expand Down Expand Up @@ -252,10 +252,14 @@ async function initBaseserver (chainId, home, node) {
// '--trust-node'
])
child.stdout.on('data', (data) => {
if (shuttingDown) return
// answer 'y' to the prompt about trust seed. we can trust this is correct
// since the baseserver is talking to our own full node
child.stdin.write('y\n')
let hashMatch = /\w{40}/g.exec(data)
if (hashMatch) {
log('approving hash', hashMatch[0])
if (shuttingDown) return
// answer 'y' to the prompt about trust seed. we can trust this is correct
// since the baseserver is talking to our own full node
child.stdin.write('y\n')
}
})
await expectCleanExit(child, 'gaia init exited unplanned')
}
Expand Down