Browse Source
Merge pull request #740 from mrfelton/fix/lnd-connect-failure-state
fix(fsm): ensure lnd connect before state change
renovate/lint-staged-8.x
JimmyMow
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
5 deletions
-
app/lib/zap/controller.js
|
|
@ -147,8 +147,8 @@ class ZapController { |
|
|
|
this.sendMessage('startOnboarding', this.lndConfig) |
|
|
|
} |
|
|
|
|
|
|
|
onStartLnd() { |
|
|
|
mainLog.debug('[FSM] onStartLnd...') |
|
|
|
onBeforeStartLnd() { |
|
|
|
mainLog.debug('[FSM] onBeforeStartLnd...') |
|
|
|
|
|
|
|
return isLndRunning().then(res => { |
|
|
|
if (res) { |
|
|
@ -168,8 +168,8 @@ class ZapController { |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
onConnectLnd() { |
|
|
|
mainLog.debug('[FSM] onConnectLnd...') |
|
|
|
onBeforeConnectLnd() { |
|
|
|
mainLog.debug('[FSM] onBeforeConnectLnd...') |
|
|
|
mainLog.info('Connecting to custom lnd instance') |
|
|
|
mainLog.info(' > host:', this.lndConfig.host) |
|
|
|
mainLog.info(' > cert:', this.lndConfig.cert) |
|
|
@ -197,7 +197,8 @@ class ZapController { |
|
|
|
} |
|
|
|
|
|
|
|
// Notify the app of errors.
|
|
|
|
return this.sendMessage('startLndError', errors) |
|
|
|
this.sendMessage('startLndError', errors) |
|
|
|
throw e |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|