Browse Source
fix(logging): log incoming channel updates
Log incoming data via the channel graph subscription to make it easier
to see what data is being received from lnd behind the scenes.
renovate/lint-staged-8.x
Tom Kirkpatrick
7 years ago
No known key found for this signature in database
GPG Key ID: 72203A8EC5967EA8
1 changed files with
2 additions and
0 deletions
-
app/lib/lnd/subscribe/channelgraph.js
|
|
@ -5,6 +5,7 @@ export default function subscribeToChannelGraph() { |
|
|
|
const call = this.lnd.subscribeChannelGraph({}) |
|
|
|
|
|
|
|
call.on('data', channelGraphData => { |
|
|
|
mainLog.info('CHANNELGRAPH:', channelGraphData) |
|
|
|
if (this.mainWindow) { |
|
|
|
this.mainWindow.send('channelGraphData', { channelGraphData }) |
|
|
|
} |
|
|
@ -12,6 +13,7 @@ export default function subscribeToChannelGraph() { |
|
|
|
call.on('end', () => mainLog.info('end')) |
|
|
|
call.on('error', error => error.code !== status.CANCELLED && mainLog.error(error)) |
|
|
|
call.on('status', channelGraphStatus => { |
|
|
|
mainLog.info('CHANNELGRAPHSTATUS:', channelGraphStatus) |
|
|
|
if (this.mainWindow) { |
|
|
|
this.mainWindow.send('channelGraphStatus', { channelGraphStatus }) |
|
|
|
} |
|
|
|