From 2464c18ef28c635b02ed10150f565dd4ed165b8f Mon Sep 17 00:00:00 2001 From: Valentine Wallace Date: Wed, 25 Jul 2018 18:34:39 -0700 Subject: [PATCH 1/2] Don't advertise channels on manual open --- src/action/channel.js | 2 ++ test/integration/action/action-integration.spec.js | 1 + 2 files changed, 3 insertions(+) diff --git a/src/action/channel.js b/src/action/channel.js index 5beaf3b1c..6eed5a5c4 100644 --- a/src/action/channel.js +++ b/src/action/channel.js @@ -62,6 +62,7 @@ class ChannelAction { channelPoint: channel.channel_point, active: channel.active, status: 'open', + private: channel.private, })); } catch (err) { log.error('Listing channels failed', err); @@ -162,6 +163,7 @@ class ChannelAction { const stream = this._grpc.sendStreamCommand('openChannel', { node_pubkey: new Buffer(pubkey, 'hex'), local_funding_amount: amount, + private: true, }); await new Promise((resolve, reject) => { stream.on('data', () => this.update()); diff --git a/test/integration/action/action-integration.spec.js b/test/integration/action/action-integration.spec.js index 5a04ad794..825f47083 100644 --- a/test/integration/action/action-integration.spec.js +++ b/test/integration/action/action-integration.spec.js @@ -400,6 +400,7 @@ describe('Action Integration Tests', function() { while (!store1.channels.length) await nap(100); expect(store1.computedChannels.length, 'to be', 1); expect(store1.computedChannels[0].status, 'to be', 'open'); + expect(store1.computedChannels[0].private, 'to be', true); }); it('should list waiting-close after force closing', async () => { From df1faf47204dea0fdbfe9339373b06c8e42db1b3 Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Fri, 27 Jul 2018 12:10:49 +0200 Subject: [PATCH 2/2] Minor cleanup --- src/action/channel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/action/channel.js b/src/action/channel.js index 6eed5a5c4..1eeae0064 100644 --- a/src/action/channel.js +++ b/src/action/channel.js @@ -61,8 +61,8 @@ class ChannelAction { remoteBalance: parseSat(channel.remote_balance), channelPoint: channel.channel_point, active: channel.active, - status: 'open', private: channel.private, + status: 'open', })); } catch (err) { log.error('Listing channels failed', err);