Commit 8cc1d96f authored by Tankred Hase's avatar Tankred Hase

Set targetConf on coop channel close

parent cfc4b7c3
......@@ -3,6 +3,7 @@
* call the corresponding GRPC apis for channel management.
*/
import { MED_TARGET_CONF } from '../config';
import { toSatoshis, poll, getTimeTilAvailable } from '../helper';
import * as log from './log';
......@@ -316,6 +317,7 @@ class ChannelAction {
const stream = this._grpc.sendStreamCommand('closeChannel', {
channelPoint: this._parseChannelPoint(channelPoint),
force,
targetConf: force ? undefined : MED_TARGET_CONF,
});
await new Promise((resolve, reject) => {
stream.on('data', data => {
......
......@@ -356,6 +356,7 @@ describe('Action Channels Unit Tests', () => {
.withArgs('closeChannel', {
channelPoint: { fundingTxidStr: 'FFFF', outputIndex: 1 },
force: false,
targetConf: 16,
})
.returns({ on: onStub });
await channel.closeChannel({ channelPoint });
......@@ -371,6 +372,7 @@ describe('Action Channels Unit Tests', () => {
.withArgs('closeChannel', {
channelPoint: { fundingTxidStr: 'FFFF', outputIndex: 1 },
force: true,
targetConf: undefined,
})
.returns({ on: onStub });
await channel.closeChannel({ channelPoint, force: true });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment